summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/ImplRepo_Service/tao_ir_i.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/ImplRepo_Service/tao_ir_i.h')
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/tao_ir_i.h150
1 files changed, 136 insertions, 14 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/tao_ir_i.h b/TAO/orbsvcs/ImplRepo_Service/tao_ir_i.h
index d45e47af58b..038a808c2a4 100644
--- a/TAO/orbsvcs/ImplRepo_Service/tao_ir_i.h
+++ b/TAO/orbsvcs/ImplRepo_Service/tao_ir_i.h
@@ -23,6 +23,9 @@
#include "tao/corba.h"
#include "orbsvcs/ImplRepoC.h"
+class TAO_IR_Op;
+// Forward Declaration
+
class TAO_IR_i
{
// = TITLE
@@ -35,30 +38,19 @@ public:
TAO_IR_i (void);
~TAO_IR_i (void);
- int run ();
+ int run (void);
// Execute client code.
int init (int argc, char **argv);
// Initialize the client communication endpoint with server.
private:
- enum Operation {ALL, ADD, REMOVE, UPDATE, LIST};
-
- void print_usage (Operation op);
- // Print out information about an operation.
-
- int read_ior (char *filename);
- // Function to read the server ior from a file.
+ void print_usage (void);
+ // Print out information about all operations.
int parse_args (void);
// Parses the arguments passed on the command line.
- int parse_add_args (void);
- // Parses arguments specific to the ADD command.
-
- int parse_list_args (void);
- // Parses arguments specific to the LIST command.
-
int argc_;
// # of arguments on the command line.
@@ -67,6 +59,136 @@ private:
CORBA::ORB_var orb_;
// Remember our orb.
+
+ ImplementationRepository::Administration_var implrepo_;
+ // Reference to our implementation repository.
+
+ TAO_IR_Op *op_;
+ // What we need to do.
+};
+
+class TAO_IR_Op
+{
+public:
+ static TAO_IR_Op *make_op (const ASYS_TCHAR *op_name, ImplementationRepository::Administration_ptr ir);
+ // Factory.
+
+ TAO_IR_Op (ImplementationRepository::Administration_ptr implrepo);
+ // Constructor.
+
+ virtual ~TAO_IR_Op (void);
+ // Virtual Destructor.
+
+ virtual int parse (int argc, ASYS_TCHAR **argv) = 0;
+ // Parse arguments.
+
+ virtual int run (void) = 0;
+ // Do the work.
+
+protected:
+ ImplementationRepository::Administration_ptr implrepo_;
+ // Reference to our implementation repository.
+
+ // = Helper methods
+
+ void display_server_information (const ImplementationRepository::ServerInformation &info);
+ // Prints out the information contained in a ServerInformation structure.
+};
+
+class TAO_IR_Op_Add : public TAO_IR_Op
+{
+public:
+ TAO_IR_Op_Add (ImplementationRepository::Administration_ptr implrepo);
+ ~TAO_IR_Op_Add (void);
+
+ virtual int parse (int argc, ASYS_TCHAR **argv);
+ virtual int run (void);
+
+protected:
+ void print_usage (void);
+ // Prints a message about the usage.
+
+ ACE_TString server_name_;
+ // POA server name.
+
+ ACE_TString command_line_;
+ // Command line.
+
+ ACE_TString working_dir_;
+ // Working directory.
+};
+
+
+// Used to list the entries in the IR
+
+class TAO_IR_Op_List : public TAO_IR_Op
+{
+public:
+ TAO_IR_Op_List (ImplementationRepository::Administration_ptr implrepo);
+ ~TAO_IR_Op_List (void);
+
+ virtual int parse (int argc, ASYS_TCHAR **argv);
+ virtual int run (void);
+
+protected:
+ void print_usage (void);
+ // Prints a message about the usage
+
+ ACE_TString server_name_;
+ // POA server name.
+
+ int verbose_server_information_;
+ // If true, more server information is displayed.
+
+ void display_server_information (const ImplementationRepository::ServerInformation &info);
+ // Prints out the information contained in a ServerInformation structure.
+ // Specialized to only print server information
+};
+
+class TAO_IR_Op_Remove : public TAO_IR_Op
+{
+public:
+ TAO_IR_Op_Remove (ImplementationRepository::Administration_ptr implrepo);
+ ~TAO_IR_Op_Remove (void);
+
+ virtual int parse (int argc, ASYS_TCHAR **argv);
+ virtual int run (void);
+
+protected:
+ void print_usage (void);
+ // Prints a message about the usage
+
+ ACE_TString server_name_;
+ // POA server name.
+};
+
+class TAO_IR_Op_Update : public TAO_IR_Op
+{
+public:
+ TAO_IR_Op_Update (ImplementationRepository::Administration_ptr implrepo);
+ ~TAO_IR_Op_Update (void);
+
+ virtual int parse (int argc, ASYS_TCHAR **argv);
+ virtual int run (void);
+
+protected:
+ void print_usage (void);
+ // Prints a message about the usage.
+
+ ACE_TString server_name_;
+ // POA server name.
+
+ int set_command_line_;
+ // True if the command_line_ needs to be updated.
+
+ ACE_TString command_line_;
+ // Startup command.
+
+ int set_working_dir_;
+ // True if the working_dir_ needs to be updated.
+
+ ACE_TString working_dir_;
+ // Working directory.
};
#endif /* TAO_IR_I_H */