summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorsumedh <sumedh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-03-12 00:20:58 +0000
committersumedh <sumedh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-03-12 00:20:58 +0000
commit0b83d11b121d934f3012a2fa01de18a8d01132ae (patch)
tree62b063c045fd36761c4d1c3bf85ad5104cfde6fa /TAO
parent260129d74d7906c9dcbd5ccc6d0aac615440d006 (diff)
downloadATCD-0b83d11b121d934f3012a2fa01de18a8d01132ae.tar.gz
*** empty log message ***
Diffstat (limited to 'TAO')
-rw-r--r--TAO/tao/tao.cpp135
1 files changed, 0 insertions, 135 deletions
diff --git a/TAO/tao/tao.cpp b/TAO/tao/tao.cpp
deleted file mode 100644
index d2da56eabd4..00000000000
--- a/TAO/tao/tao.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// tao
-//
-// = FILENAME
-// tao.cpp
-//
-// = AUTHOR
-// Sumedh Mungee <sumedh@cs.wustl.edu>
-//
-//
-// ============================================================================
-#include "tao.h"
-
-// Initialize the ORB, using the supplied command line arguments.
-// the poa_name is a user-supplied string that is used to name the
-// POA created.
-int
-TAO_ORB_Manager::init (int argc,
- char **argv,
- char *poa_name,
- CORBA::Environment &env)
-{
- this->orb_ = CORBA::ORB_init (argc,
- argv,
- 0,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Get the POA from the ORB
- CORBA::Object_var poa_object =
- this->orb_->resolve_initial_references("RootPOA");
- if (CORBA::is_nil(poa_object.in()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
-
- // Get the POA object
- this->root_poa_ =
- PortableServer::POA::_narrow (poa_object.in (), env);
-
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Get the POA_Manager
- this->poa_manager_ =
- this->root_poa_->the_POAManager (env);
-
- TAO_CHECK_ENV_RETURN (env, 1);
-
- // Create the default policies - user-supplied ID, and persistent objects
- PortableServer::PolicyList policies (2);
- policies.length (2);
- policies[0] =
- this->root_poa_->create_id_assignment_policy (PortableServer::USER_ID,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- policies[1] =
- this->root_poa_->create_lifespan_policy (PortableServer::PERSISTENT,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
-
- // We use a different POA, otherwise the user would have to
- // change the object key each time it invokes the server.
-
- this->my_poa_ =
- this->root_poa_->create_POA (poa_name,
- this->poa_manager_.in (),
- policies,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
- return 0;
-}
-
-CORBA::String
-TAO_ORB_Manager::activate (const char *object_name,
- PortableServer::Servant servant,
- CORBA_Environment &env)
-{
-
- if (object_name == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "\n(%P|%t) TAO_ORB_Manager::register: "
- "object_name is null!"),
- 0);
-
- PortableServer::ObjectId_var id =
- PortableServer::string_to_ObjectId (object_name);
-
- this->my_poa_->activate_object_with_id (id.in (),
- servant,
- env);
- TAO_CHECK_ENV_RETURN (env, 0);
-
- CORBA::Object_var obj =
- this->my_poa_->id_to_reference (id.in (),
- env);
- TAO_CHECK_ENV_RETURN (env, 0);
-
- CORBA::String str =
- this->orb_->object_to_string (obj.in (),
- env);
-
- TAO_CHECK_ENV_RETURN (env, 0);
-
- return str;
-}
-
-int
-TAO_ORB_Manager::run (CORBA::Environment &env)
-{
- this->poa_manager_->activate (env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- if (this->orb_->run () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "run"), -1);
-
- this->root_poa_->destroy (CORBA::B_TRUE,
- CORBA::B_TRUE,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-}
-
-CORBA::ORB_var
-TAO_ORB_Manager::orb (void)
-{
- return this->orb_;
-}
-