summaryrefslogtreecommitdiff
path: root/trunk/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.h
blob: 60e84a9f3d4ad69c6113c339fc5faaf7058784df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
// -*- C++ -*-
// $Id$

// ============================================================================
//
// = LIBRARY
//    TAO/orbsvcs/tests/InterfaceRepo
//
// = FILENAME
//    idl3_client.h
//
// = DESCRIPTION
//    This class tests the IFR support for CCM-related types.
//
// = AUTHOR
//    Jeff Parsons <j.parsons@vanderbilt.edu>
//
// ============================================================================

#ifndef IDL3_CLIENT_H
#define IDL3_CLIENT_H

#include "tao/IFR_Client/IFR_ComponentsC.h"

class IDL3_Client
{
  // = TITLE
  //     Component-aware IFR Client Implementation
  //
  // = DESCRIPTION
  //     Class wrapper for a client which tests the Interface Repository
  //     support for the OMG IDL3 extensions.
public:
  IDL3_Client (void);
  // Constructor

  ~IDL3_Client (void);
  // Destructor

  int init (int argc,
            char *argv[]
            ACE_ENV_ARG_DECL);
  // Initialize the ORB and get the IFR object reference.

  int run (ACE_ENV_SINGLE_ARG_DECL);
  // Execute test code.

private:
  int parse_args (int argc,
                  char *argv[]);
  // Process the command line arguments.

  int component_test (ACE_ENV_SINGLE_ARG_DECL);
  int home_test (ACE_ENV_SINGLE_ARG_DECL);

  // Also tests eventtype.
  int valuetype_test (const char *repo_id,
                      const char *prefix
                      ACE_ENV_ARG_DECL);

  int component_attribute_test (
      CORBA::InterfaceAttrExtension::ExtFullInterfaceDescription_var &
      ACE_ENV_ARG_DECL
    );

  int component_inheritance_test (CORBA::ComponentIR::ComponentDef_var &
                                  ACE_ENV_ARG_DECL);

  int component_port_test (CORBA::ComponentIR::ComponentDef_var &
                           ACE_ENV_ARG_DECL);

  int provides_test (CORBA::ComponentIR::ProvidesDescriptionSeq &
                     ACE_ENV_ARG_DECL);

  int uses_test (CORBA::ComponentIR::UsesDescriptionSeq &
                 ACE_ENV_ARG_DECL);

  int event_port_test (CORBA::ComponentIR::EventPortDescriptionSeq &,
                       CORBA::ULong seq_length,
                       const char *port_type,
                       const char **names,
                       const char **ids
                       ACE_ENV_ARG_DECL);

  int valuetype_inheritance_test (CORBA::ExtValueDef_var &,
                                  const char *prefix
                                  ACE_ENV_ARG_DECL);

  int valuetype_attribute_test (
      CORBA::ExtValueDef::ExtFullValueDescription_var &,
      const char *prefix
      ACE_ENV_ARG_DECL
    );

  int valuetype_operation_test (
      CORBA::ExtValueDef::ExtFullValueDescription_var &,
      const char *prefix
      ACE_ENV_ARG_DECL
    );

  int valuetype_member_test (
      CORBA::ExtValueDef::ExtFullValueDescription_var &,
      const char *prefix
      ACE_ENV_ARG_DECL
    );

  int valuetype_factory_test (
      CORBA::ExtValueDef::ExtFullValueDescription_var &,
      const char *prefix
      ACE_ENV_ARG_DECL
    );

  int home_inheritance_test (CORBA::ComponentIR::HomeDef_var &
                             ACE_ENV_ARG_DECL);

  int home_factory_test (CORBA::ComponentIR::HomeDescription *
                         ACE_ENV_ARG_DECL);

  int home_finder_test (CORBA::ComponentIR::HomeDescription *
                        ACE_ENV_ARG_DECL);

private:
  bool debug_;
  // Flag to output detailed error messages.

  CORBA::ORB_var orb_;
  // Storage of the ORB reference.

  CORBA::Repository_var repo_;
  // Storage of the IFR reference.
};

#endif /* IDL3_CLIENT_H */