Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / orbsvcs / tests / InterfaceRepo / IFR_Test / Admin_Client.h
blobd482201fe22be73139c52e91fb859e5902a5c9d0
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Admin_Client.h
7 * This class tests the functionality of the IFR methods by inserting
8 * IR objects into the repository by hand, querying them, moving them,
9 * and destroying them.
11 * @author Jeff Parsons <parsons@cs.wustl.edu>
13 //=============================================================================
16 #if !defined (ADMIN_CLIENT_H)
17 #define ADMIN_CLIENT_H
19 #include "tao/IFR_Client/IFR_BasicC.h"
20 #include "tao/ORB.h"
22 const CORBA::ULong NUMBER_OF_TESTS = 11;
24 /**
25 * @class Admin_Client
27 * @brief Administrating IFR Client Implementation
29 * Class wrapper for a client which puts the Interface Repository
30 * methods through their paces.
32 class Admin_Client
34 public:
35 /// Constructor
36 Admin_Client (void);
38 /// Destructor
39 ~Admin_Client (void);
41 /// Initialize the ORB and get the IFR object reference.
42 int init (int argc,
43 ACE_TCHAR *argv[]);
45 /// Execute test code.
46 int run (void);
48 private:
49 /// The various IFR tests.
50 void array_test (void);
51 void enum_test (void);
52 void alias_test (void);
53 void native_test (void);
54 void struct_test (void);
55 void union_test (void);
56 void exception_test (void);
57 void constant_test (void);
58 void interface_test (void);
59 void move_test (void);
60 void module_test (void);
62 /// Process the command line arguments.
63 int parse_args (int argc,
64 ACE_TCHAR *argv[]);
66 /// Array of pointers to the test functions.
67 void (Admin_Client::*test_array_[NUMBER_OF_TESTS])(void);
69 /// Array of test names used in selection of one test.
70 static const char *test_names_[];
72 /// Flag to output results of IFR queries.
73 CORBA::Boolean debug_;
75 /// Are we running all the tests or just one?
76 CORBA::Boolean all_tests_;
78 /// Array index of the selected test function.
79 CORBA::ULong which_test_;
81 /// # of times to run each test.
82 CORBA::ULong iterations_;
84 /// Storage of the ORB reference.
85 CORBA::ORB_var orb_;
87 /// Storage of the IFR reference.
88 CORBA::Repository_var repo_;
91 #endif /* ADMIN_CLIENT_H */