summaryrefslogtreecommitdiff
path: root/examples/Persistent_Grid/Simple_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Persistent_Grid/Simple_util.h')
-rw-r--r--examples/Persistent_Grid/Simple_util.h127
1 files changed, 64 insertions, 63 deletions
diff --git a/examples/Persistent_Grid/Simple_util.h b/examples/Persistent_Grid/Simple_util.h
index b63f79c4eaa..31547676bce 100644
--- a/examples/Persistent_Grid/Simple_util.h
+++ b/examples/Persistent_Grid/Simple_util.h
@@ -1,20 +1,17 @@
-//$Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Simple
-//
-// = FILENAME
-// Simple_Util.h
-//
-// = DESCRIPTION
-// The classe define the templates for the client and server.
-//
-// = AUTHOR
-// Balachandran Natarajan <bala@cs.wustl.edu>
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file Simple_util.h
+ *
+ * $Id$
+ *
+ * The classe define the templates for the client and server.
+ *
+ *
+ * @author Balachandran Natarajan <bala@cs.wustl.edu>
+ */
+//=============================================================================
+
#ifndef TAO_UTIL_H
#define TAO_UTIL_H
@@ -23,132 +20,136 @@
#include "ace/Get_Opt.h"
#include "ace/Read_Buffer.h"
+/**
+ * @class Server
+ *
+ * @brief A set of useful class Templates for using the TAO CORBA
+ * implementation.
+ *
+ * A template server definition. This template can be used by
+ * single server/client projects for defintion of their
+ * server/clients. See the directories time, bank, echo for
+ * further details of implemenatation.
+ */
template <class Servant>
class Server
{
- // = TITLE
- // A set of useful class Templates for using the TAO CORBA
- // implementation.
- //
- // = DESCRIPTION
- // A template server definition. This template can be used by
- // single server/client projects for defintion of their
- // server/clients. See the directories time, bank, echo for
- // further details of implemenatation.
public:
// = Initialization and termination methods.
+ /// Constructor.
Server (void);
- // Constructor.
+ /// Destructor.
~Server (void);
- // Destructor.
+ /// Initialize the Server state - parsing arguments and waiting.
+ /// interface_name is the name used to register the Servant.
int init (const char *servant_name,
int argc,
ACE_TCHAR *argv[]);
- // Initialize the Server state - parsing arguments and waiting.
- // interface_name is the name used to register the Servant.
// int register_name (void);
// After calling <init>, this method will register the server with
// the TAO Naming Service using the servant_name passed to <init>.
+ /// Run the orb.
int run (void);
- // Run the orb.
protected:
+ /// Servant class
Servant servant_;
- // Servant class
+ /// name of the servant to be used for TAO Naming Service
const char *name;
- // name of the servant to be used for TAO Naming Service
+ /// Parses the commandline arguments.
int parse_args (void);
- // Parses the commandline arguments.
+ /// The ORB manager - a helper class for accessing the POA and
+ /// registering objects.
TAO_ORB_Manager orb_manager_;
- // The ORB manager - a helper class for accessing the POA and
- // registering objects.
+ /// File where the IOR of the server object is stored.
FILE *ior_output_file_;
- // File where the IOR of the server object is stored.
+ /// Memory pool name that stores the state
ACE_TCHAR* mem_pool_name_;
- // Memory pool name that stores the state
+ /// Number of command line arguments.
int argc_;
- // Number of command line arguments.
+ /// The command line arguments.
ACE_TCHAR **argv_;
- // The command line arguments.
};
// Client Class starts here
+/**
+ * @class Client
+ *
+ * @brief Template Client class
+ *
+ * A template client implementation for a single server/client
+ * model. The example usage of these usage can be found in the
+ * sub-directories below
+ */
template <class InterfaceObj, class Var>
class Client
{
- // = TITLE
- // Template Client class
- //
- // = DESCRIPTION
- // A template client implementation for a single server/client
- // model. The example usage of these usage can be found in the
- // sub-directories below
public:
// = Initialization and termination methods.
+ /// Constructor.
Client (void);
- // Constructor.
+ /// Destructor.
~Client (void);
- // Destructor.
+ /// Initialize the client communication endpoint with server.
int init (const char *name,int argc, ACE_TCHAR *argv[]);
- // Initialize the client communication endpoint with server.
+ /// Return the interface object pointer.
InterfaceObj *operator-> () { return server_.in ();};
- // Return the interface object pointer.
+ /// Returns the shutdown flag.
int shutdown (void );
- // Returns the shutdown flag.
+ /// Fills in the shutdwon flag.
void shutdown (int);
- // Fills in the shutdwon flag.
+ /// Initialize naming service
int obtain_initial_references (void);
- // Initialize naming service
protected:
+ /// Function to read the server IOR from a file.
int read_ior (ACE_TCHAR *filename);
- // Function to read the server IOR from a file.
+ /// Parses the arguments passed on the command line.
int parse_args (void);
- // Parses the arguments passed on the command line.
+ /// Remember our orb.
CORBA::ORB_var orb_;
- // Remember our orb.
+ /// # of arguments on the command line.
int argc_;
- // # of arguments on the command line.
+ /// arguments from command line.
ACE_TCHAR **argv_;
- // arguments from command line.
+ /// IOR of the obj ref of the server.
char *ior_;
- // IOR of the obj ref of the server.
+ /// Flag to use the naming service
int naming_;
- // Flag to use the naming service
+ /// Flag for shutting down the server
int shutdown_;
- // Flag for shutting down the server
+ /// Server object
Var server_;
- // Server object
};
#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)