summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-25 06:22:08 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-25 06:22:08 +0000
commitebe3895e885744531650999f35bfdea27b2c04dc (patch)
treeac4e093783e0c94d67960a49ae84f92da70af733
parentf96b94bf87593501df903740021ce8f599c5fd89 (diff)
downloadATCD-ebe3895e885744531650999f35bfdea27b2c04dc.tar.gz
Fixed tabs and trailing spaces
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/ImplRepo.idl102
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp44
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.h16
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Ping.idl8
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Repository.cpp56
5 files changed, 112 insertions, 114 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/ImplRepo.idl b/TAO/orbsvcs/ImplRepo_Service/ImplRepo.idl
index 51f9b1a529d..b6923ac43cb 100644
--- a/TAO/orbsvcs/ImplRepo_Service/ImplRepo.idl
+++ b/TAO/orbsvcs/ImplRepo_Service/ImplRepo.idl
@@ -13,102 +13,102 @@ interface Implementation_Repository
{
exception Already_Registered {};
// Object already bound in the Implementation Repository
-
- exception Cannot_Activate
- {
- string reason_;
- };
-
+
+ exception Cannot_Activate
+ {
+ string reason_;
+ };
+
exception Not_Found {};
// Object not found in the Implementation Repository
- struct Environment_Variable
- {
- string name_;
- string value_;
+ struct Environment_Variable
+ {
+ string name_;
+ string value_;
};
- // One environment variable
-
- struct INET_Addr
- {
+ // One environment variable
+
+ struct INET_Addr
+ {
unsigned short port_;
- unsigned long host_;
- };
+ unsigned long host_;
+ };
// The location of a server
-
- struct Process_Options
- {
+
+ struct Process_Options
+ {
string command_line_;
// Command line options
string environment_;
- // Environment
- string working_directory_;
- // Working directory
- unsigned long creation_flags_;
+ // Environment
+ string working_directory_;
+ // Working directory
+ unsigned long creation_flags_;
// Creation flags
- };
-
-// Object activate_object (in Object obj)
+ };
+
+// Object activate_object (in Object obj)
// raises (Not_Found,
// Cannot_Activate);
// Restart server that will contain this persistent object and return the
- // new Object reference.
+ // new Object reference.
//
// The <Not_Found> exception is raised when <obj> is not found
// in the Implementation Repository. The <Cannot_Activate> exception
// is raised when <obj> is found in the Repository but could not be
- // activated.
-
+ // activated.
+
// INET_Addr activate_server (in string server)
-// raises (Not_Found,
+// raises (Not_Found,
// Cannot_Activate);
- // Restart server that is named <server> and return the host/port
- //
+ // Restart server that is named <server> and return the host/port
+ //
// The <Not_Found> exception is raised when <server> is not found
// in the Implementation Repository. The <Cannot_Activate> exception
// is raised when <server> is found in the Repository but could not be
- // activated.
-
-
+ // activated.
+
+
void register_server (in string server,
in Process_Options options)
raises (Already_Registered);
- // Restart server process when client is looking for <server>.
+ // Restart server process when client is looking for <server>.
//
// The <Already_Registered> exception is raised when <server> has
- // already been registered with the Implementation Repository.
- //
+ // already been registered with the Implementation Repository.
+ //
// The <Object_Not_Persistent> exception is raised when <server> is
// not a Persistent Object Reference.
-
+
// void reregister_server (in string server,
// in Process_Options options)
// raises (Already_Registered);
- // Restart server process when client is looking for <server>.
+ // Restart server process when client is looking for <server>.
//
// The <Already_Registered> exception is raised when <server> has
- // already been registered with the Implementation Repository.
- //
+ // already been registered with the Implementation Repository.
+ //
// The <Object_Not_Persistent> exception is raised when <server> is
// not a Persistent Object Reference.
-
-
-// void remove_server (in string server)
+
+
+// void remove_server (in string server)
// raises (Not_Found);
- // Remove <server> from the Implementation Repository.
+ // Remove <server> from the Implementation Repository.
//
// The <Not_Found> exception is raised when <server> is not found
// in the Implementation Repository.
-
+
// Profile server_is_running (in string server,
void server_is_running (in string server,
- in INET_Addr addr,
+ in INET_Addr addr,
in Ping_Object ping);
// Used to notify the Implementation Repository that <server> is alive and
- // well at <addr>.
-
+ // well at <addr>.
+
// void server_is_shutting_down (in string server);
// Used to tell the Implementation Repository that <server> is shutting
- // down.
+ // down.
};
diff --git a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp
index e0c0bfd1b62..6980f6d21b0 100644
--- a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.cpp
@@ -27,7 +27,7 @@ void ImplRepo_i::start (const char *server)
ACE_DEBUG ((LM_DEBUG, "Starting %s\n", server));
ACE_Process_Options proc_opts;
-
+
proc_opts.command_line (cl);
ACE_Process proc;
@@ -36,7 +36,7 @@ void ImplRepo_i::start (const char *server)
ACE_OS::sleep (2);
delete [] cl;
- }
+ }
else
{
ACE_DEBUG ((LM_DEBUG, "ERROR starting %s\n", server));
@@ -150,7 +150,7 @@ ImplRepo_i::init (int argc, char **argv, CORBA::Environment &_env)
if (retval != 0)
return retval;
- ACE_NEW_RETURN (this->server_impl_,
+ ACE_NEW_RETURN (this->server_impl_,
IR_Simple_i (this->orb_manager_.orb (),
this->orb_manager_.child_poa (),
this),
@@ -175,12 +175,12 @@ ImplRepo_i::init (int argc, char **argv, CORBA::Environment &_env)
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG, "The IR IOR is: <%s>\n", ir_var.in ()));
-
+
FILE *ir_file = ACE_OS::fopen ("implrepo.ior", "w");
ACE_OS::fprintf (ir_file, "%s", ir_var.in ());
ACE_OS::fclose (ir_file);
- ACE_NEW_RETURN (this->activator_,
+ ACE_NEW_RETURN (this->activator_,
IR_Adapter_Activator(this->server_impl_),
-1);
@@ -194,7 +194,7 @@ ImplRepo_i::init (int argc, char **argv, CORBA::Environment &_env)
this->orb_manager_.root_poa ()->the_activator (activator.in (), TAO_TRY_ENV);
TAO_CHECK_ENV;
-
+
}
TAO_CATCHANY
{
@@ -315,7 +315,7 @@ ImplRepo_i::~ImplRepo_i (void)
delete this->activator_;
}
-void
+void
ImplRepo_i::register_server (const char *server,
const Implementation_Repository::Process_Options &options,
CORBA::Environment &env)
@@ -347,15 +347,15 @@ IR_Adapter_Activator::IR_Adapter_Activator (IR_Simple_i_ptr servant)
}
-CORBA::Boolean
+CORBA::Boolean
IR_Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent,
const char *name,
CORBA_Environment &env)
{
ACE_DEBUG ((LM_DEBUG, "Unknown Adapter called\n"));
-
+
CORBA::PolicyList policies (4);
- policies.length (4);
+ policies.length (4);
// ID Assignment Policy
policies[0] =
@@ -374,7 +374,7 @@ IR_Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent,
env.print_exception ("PortableServer::POA::create_lifespan_policy");
return -1;
}
-
+
// Request Processing Policy
policies[2] =
parent->create_request_processing_policy (PortableServer::USE_DEFAULT_SERVANT, env);
@@ -383,7 +383,7 @@ IR_Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent,
env.print_exception ("PortableServer::POA::create_request_processing_policy");
return -1;
}
-
+
// Id Uniqueness Policy
policies[3] =
parent->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID, env);
@@ -396,7 +396,7 @@ IR_Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent,
PortableServer::POA_var child = parent->create_POA (name,
PortableServer::POAManager::_nil (),
policies,
- env);
+ env);
if (env.exception () != 0)
return 0;
@@ -406,7 +406,7 @@ IR_Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent,
{
CORBA::Policy_ptr policy = policies[i];
policy->destroy (env);
- }
+ }
if (env.exception () != 0)
{
@@ -431,7 +431,7 @@ IR_Adapter_Activator::unknown_adapter (PortableServer::POA_ptr parent,
}
child->set_servant (this->servant_, env);
-
+
if (env.exception () != 0)
{
env.print_exception ("unknown_adapter, set_servant");
@@ -482,7 +482,7 @@ int IR_Simple_i::forward (CORBA::Environment &env)
{
this->ir_impl_->start ("Simple_Server");
- ACE_DEBUG ((LM_DEBUG, "Forwarding to %s\n",
+ ACE_DEBUG ((LM_DEBUG, "Forwarding to %s\n",
this->orb_var_->object_to_string (this->forward_to_ptr_)));
if (!CORBA::is_nil (this->forward_to_ptr_))
@@ -490,10 +490,10 @@ int IR_Simple_i::forward (CORBA::Environment &env)
env.exception (new PortableServer::ForwardRequest (this->forward_to_ptr_));
/*
ACE_DEBUG ((LM_DEBUG, "Forwarding...\n"));
-
+
PortableServer::ObjectId_var oid =
this->poa_var_->servant_to_id (this, env);
-
+
if (env.exception () != 0)
return -1;
@@ -504,11 +504,11 @@ int IR_Simple_i::forward (CORBA::Environment &env)
// env.exception (exception);
return -1;
}
-
+
void *ptr = servant->_downcast ("IDL:PortableServer/POA:1.0");
POA_PortableServer::POA *poa = (POA_PortableServer::POA *) ptr;
TAO_POA *tao_poa = ACE_dynamic_cast (TAO_POA *, poa);
-
+
tao_poa->forward_object (oid.in (),
this->forward_to_var_.in (),
env);*/
@@ -530,9 +530,7 @@ void IR_Simple_i::forward_to (CORBA::Object_ptr forward_to_ptr)
*new_profile = iiop_obj->profile;
IIOP_Object *new_iiop_obj = new IIOP_Object (iiop_obj->type_id, *new_profile);
- this->forward_to_ptr_ =
+ this->forward_to_ptr_ =
new CORBA_Object (new_iiop_obj, forward_to_ptr->_servant ());
}
-
-
diff --git a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.h b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.h
index 183fd099e38..d3026be3f5a 100644
--- a/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.h
+++ b/TAO/orbsvcs/ImplRepo_Service/ImplRepo_i.h
@@ -5,7 +5,7 @@
//
// = LIBRARY
// TAO/orbsvcs/ImplRepo_Service
-//
+//
// = FILENAME
// ImplRepo_i.h
//
@@ -14,11 +14,11 @@
//
// = AUTHOR
// Darrell Brunsch <brunsch@cs.wustl.edu>
-//
+//
// ============================================================================
#if !defined (IMPLREPO_I_H)
-#define IMPLREPO_I_H
+#define IMPLREPO_I_H
#include "ImplRepoS.h"
#include "Repository.h"
@@ -40,7 +40,7 @@ class IR_Adapter_Activator : public POA_PortableServer::AdapterActivator
// Implementation Repository Adapter Activator
//
// = DESCRIPTION
- // Part of the Default Servant/DSI combination that forwards
+ // Part of the Default Servant/DSI combination that forwards
// arbitrary requests. This allows for the setting up of child POAs
// with default servants.
public:
@@ -57,7 +57,7 @@ private:
class ImplRepo_i : public POA_Implementation_Repository
{
// = TITLE
- // Implementation Repository
+ // Implementation Repository
//
// = DESCRIPTION
// This provides the interface to communicate directly with the
@@ -76,14 +76,14 @@ public:
const Implementation_Repository::INET_Addr &addr,
Ping_Object_ptr ping,
CORBA::Environment &_tao_environment);
-
+
// = Other methods
int init (int argc, char **argv, CORBA::Environment& env);
// Initialize the Server state - parsing arguments and waiting
int run (CORBA::Environment& env);
- // Run the orb
+ // Run the orb
void start (const char *server);
// Starts the program registered as <server>
@@ -128,7 +128,7 @@ class IR_Simple_i: public POA_simple_object
// Simple Object Implementation
//
// = DESCRIPTION
- // Implementation of a simple object that has two methods, one that
+ // Implementation of a simple object that has two methods, one that
// returns the cube of a long, another that shuts down the server.
public:
// = Constructor and Destructor
diff --git a/TAO/orbsvcs/ImplRepo_Service/Ping.idl b/TAO/orbsvcs/ImplRepo_Service/Ping.idl
index 4c78ce81622..96abb0b32de 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Ping.idl
+++ b/TAO/orbsvcs/ImplRepo_Service/Ping.idl
@@ -1,10 +1,10 @@
// $Id$
-interface Ping_Object
-{
+interface Ping_Object
+{
void ping ();
// Used for checking for liveness of a server. When the server receives
- // this, it should send back a response indicating it is sill alive.
+ // this, it should send back a response indicating it is sill alive.
// Depending on the policy specified, a timeout can be reached where the
- // Implementation Repository will restart the server.
+ // Implementation Repository will restart the server.
};
diff --git a/TAO/orbsvcs/ImplRepo_Service/Repository.cpp b/TAO/orbsvcs/ImplRepo_Service/Repository.cpp
index fba190c1039..ed92eda4eca 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Repository.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/Repository.cpp
@@ -11,40 +11,40 @@ Repository::Repository ()
}
// Add a new server to the Repository
-int
+int
Repository::add (const char *key, const Repository::Record &rec)
{
char *temp; // Temporary string to hold all the variables in.
- // Needs to be as long as all the lengths plus the separators and the
+ // Needs to be as long as all the lengths plus the separators and the
// null character.
- ACE_NEW_RETURN (temp,
- char [ACE_OS::strlen (rec.comm_line)
- + ACE_OS::strlen (rec.env)
- + ACE_OS::strlen (rec.wdir)
+ ACE_NEW_RETURN (temp,
+ char [ACE_OS::strlen (rec.comm_line)
+ + ACE_OS::strlen (rec.env)
+ + ACE_OS::strlen (rec.wdir)
+ ACE_OS::strlen (rec.ior)
+ 4],
-1);
-
+
//Put them all in a string
- ACE_OS::sprintf (temp,
- "%s\n%s\n%s\n%s",
- rec.comm_line,
- rec.env,
- rec.wdir,
+ ACE_OS::sprintf (temp,
+ "%s\n%s\n%s\n%s",
+ rec.comm_line,
+ rec.env,
+ rec.wdir,
rec.ior);
-
+
// Store the record in the repository.
int retval = this->repository_.bind (key, temp);
-
+
// Clean up and exit.
delete [] temp;
-
+
return retval;
}
-
+
// Removes the server from the Repository
-int
+int
Repository::remove (const char *key)
{
return this->repository_.unbind (key);
@@ -52,13 +52,13 @@ Repository::remove (const char *key)
// Find the key record in the Repository
-int
+int
Repository::resolve (const char *key, Repository::Record &rec)
{
char *value, *type; // Temp variables needed for resolve
char *last, *temp ; // For fields
int retval = this->repository_.resolve (key, value, type);
-
+
// If successful, return what we need.
while (retval == 0)
{
@@ -68,7 +68,7 @@ Repository::resolve (const char *key, Repository::Record &rec)
{
*last = '\0';
ACE_NEW_RETURN (rec.comm_line, char [strlen (temp) + 1], -1);
-
+
// Copy to the comm_line argument
strcpy (rec.comm_line, temp);
}
@@ -84,7 +84,7 @@ Repository::resolve (const char *key, Repository::Record &rec)
{
*last = '\0';
ACE_NEW_RETURN (rec.env, char [strlen (temp) + 1], -1);
-
+
// Copy to the env argument
strcpy (rec.env, temp);
}
@@ -98,11 +98,11 @@ Repository::resolve (const char *key, Repository::Record &rec)
if (last != 0)
{
ACE_NEW_RETURN (rec.wdir, char [strlen (temp) + 1], -1);
-
+
// Copy to the env argument
strcpy (rec.wdir, temp);
}
- else
+ else
{
retval = -1;
break;
@@ -112,11 +112,11 @@ Repository::resolve (const char *key, Repository::Record &rec)
if (last != 0)
{
ACE_NEW_RETURN (rec.ior, char [strlen (temp) + 1], -1);
-
+
// Copy to the env argument
strcpy (rec.ior, temp);
}
- else
+ else
{
retval = -1;
break;
@@ -132,7 +132,7 @@ Repository::resolve (const char *key, Repository::Record &rec)
}
// = Accessor methods
-int
+int
Repository::get_comm_line (const char *key, char *&comm_line)
{
Repository::Record rec;
@@ -147,7 +147,7 @@ Repository::get_comm_line (const char *key, char *&comm_line)
}
-int
+int
Repository::get_env (const char *key, char *&env)
{
Repository::Record rec;
@@ -161,7 +161,7 @@ Repository::get_env (const char *key, char *&env)
return retval;
}
-int
+int
Repository::get_wdir (const char *key, char *&wdir)
{
Repository::Record rec;