Public Member Functions | Private Attributes

TAO_RTScheduler_Loader Class Reference

#include <RTScheduler_Loader.h>

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

List of all members.

Public Member Functions

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

Private Attributes

bool initialized_
 Set to true after init is called.

Detailed Description

Definition at line 33 of file RTScheduler_Loader.h.


Constructor & Destructor Documentation

TAO_RTScheduler_Loader::TAO_RTScheduler_Loader ( void   ) 

Constructor.

Definition at line 16 of file RTScheduler_Loader.cpp.

  : initialized_ (false)
{
}

TAO_RTScheduler_Loader::~TAO_RTScheduler_Loader ( void   )  [virtual]

Destructor.

Definition at line 21 of file RTScheduler_Loader.cpp.

{
}


Member Function Documentation

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

Initialize the RTScheduler loader hooks.

Register the RTCORBA ORBInitializer.

Reimplemented from ACE_Shared_Object.

Definition at line 26 of file RTScheduler_Loader.cpp.

{
  ACE_TRACE ("TAO_RTScheduler_Loader::init");

  if (TAO_debug_level > 0)
    ACE_DEBUG ((LM_DEBUG,
                "In RTScheduler_Loader::init\n"));

  // Only allow initialization once.
  if (this->initialized_)
    return 0;

  this->initialized_ = true;

  ACE_Service_Gestalt *gestalt = ACE_Service_Config::current ();

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

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

  // Register the ORB initializer.
  try
    {
      PortableInterceptor::ORBInitializer_ptr temp_orb_initializer =
        PortableInterceptor::ORBInitializer::_nil ();

      /// Register the RTCORBA ORBInitializer.
      ACE_NEW_THROW_EX (temp_orb_initializer,
                        TAO_RTScheduler_ORB_Initializer,
                        CORBA::NO_MEMORY (
                          CORBA::SystemException::_tao_minor_code (
                          TAO::VMCID,
                          ENOMEM),
                          CORBA::COMPLETED_NO));

      PortableInterceptor::ORBInitializer_var orb_initializer =
        temp_orb_initializer;

      PortableInterceptor::register_orb_initializer (orb_initializer.in ());
    }
  catch (const ::CORBA::Exception& ex)
    {
      ex._tao_print_exception (
        "Unexpected exception caught while initializing the RTScheduler:");
      return 1;
    }

  return 0;
}


Member Data Documentation

Set to true after init is called.

Definition at line 47 of file RTScheduler_Loader.h.


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