Public Member Functions | Private Attributes

TAO_Messaging_Loader Class Reference

#include <Messaging_Loader.h>

Inheritance diagram for TAO_Messaging_Loader:
Inheritance graph
[legend]
Collaboration diagram for TAO_Messaging_Loader:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TAO_Messaging_Loader (void)
 Constructor.
virtual ~TAO_Messaging_Loader (void)
 Destructor.
virtual int init (int argc, ACE_TCHAR *[])
 Initialize the Messaging loader hooks.

Private Attributes

bool initialized_
 Set to true after init is called.

Detailed Description

Definition at line 30 of file Messaging_Loader.h.


Constructor & Destructor Documentation

TAO_Messaging_Loader::TAO_Messaging_Loader ( void   ) 

Constructor.

Definition at line 17 of file Messaging_Loader.cpp.

  : initialized_ (false)
{
}

TAO_Messaging_Loader::~TAO_Messaging_Loader ( void   )  [virtual]

Destructor.

Definition at line 22 of file Messaging_Loader.cpp.

{
}


Member Function Documentation

int TAO_Messaging_Loader::init ( int  argc,
ACE_TCHAR [] 
) [virtual]

Initialize the Messaging loader hooks.

Register the Messaging ORBInitializer.

Reimplemented from ACE_Shared_Object.

Definition at line 27 of file Messaging_Loader.cpp.

{
  ACE_TRACE ("TAO_Messaging_Loader::init");

  if (this->initialized_)
    return 0;

  this->initialized_ = true;

  ACE_Service_Gestalt *gestalt = ACE_Service_Config::current ();

  ACE_Service_Object * const messaging_loader =
    ACE_Dynamic_Service<ACE_Service_Object>::instance (
      gestalt,
      "Messaging_Loader",
      true);

  if (messaging_loader != 0 && messaging_loader != this)
    {
      return messaging_loader->init (0, 0);
    }

  PortableInterceptor::ORBInitializer_ptr temp_orb_initializer =
    PortableInterceptor::ORBInitializer::_nil ();
  PortableInterceptor::ORBInitializer_var orb_initializer;

  try
    {
      /// Register the Messaging ORBInitializer.

      ACE_NEW_THROW_EX (temp_orb_initializer,
                        TAO_Messaging_ORBInitializer,
                        CORBA::NO_MEMORY (
                          CORBA::SystemException::_tao_minor_code (
                            TAO::VMCID,
                            ENOMEM),
                          CORBA::COMPLETED_NO));

      orb_initializer = temp_orb_initializer;

      PortableInterceptor::register_orb_initializer (orb_initializer.in ());
    }
  catch (const ::CORBA::Exception& ex)
    {
      if (TAO_debug_level > 0)
        {
          ex._tao_print_exception ("Caught exception:");
        }
      return -1;
    }

  return 0;
}


Member Data Documentation

Set to true after init is called.

Definition at line 44 of file Messaging_Loader.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines