nc::ORBHelper − |
#include <acsncORBHelper.h> |
Public Member Functions |
ORBHelper () |
ORBHelper (int argc, char *argv[]) |
virtual ~ORBHelper () |
CORBA::ORB_ptr getORB () const |
void runOrb () |
Private Member Functions |
void init_ORB () |
void init_ORB (int argc, char *argv[]) |
void operator= (const ORBHelper &) |
ORBHelper (const ORBHelper &) |
Static Private Member Functions |
static void * runOrbThread (void *pThis) |
Private Attributes |
CORBA::ORB_ptr orb_mp |
baci::BACIThreadManager * threadManager_mp |
The class ORBHelper is used to create and start an Object Request Broker. This is useful because the ORB will be spawned in a separate thread. Two different initialization options are available: one using a default setup and another passing parameters to the orb (as argc and argv respectively). TODO: |
• |
move this class to the acsutil module |
|||
• |
check for memory leaks |
nc::ORBHelper::ORBHelper () Default Constructor This constructor uses default parameters (NameService and NotifyFactory dynamically generated using the hostname). Should be used only when this object will be instantiated on the same host as manager. |
nc::ORBHelper::ORBHelper (int argc, char * argv[]) Constructor This constructor assumes all parameters needed by the ORB are passed directly in argc and argv. This constructor is much more powerful than the default and should normally be used. A sample usage would be: argc=4 argv={’’, ’-ORBInitRef NameService=corbaloc::hostname:xxxx/NameService’, ’-ORBDottedDecimalAddresses=1’, ’-ORBInitRef NotifyEventChannelFactory=corbaloc::hostname:xxxx/NotifyEventChannelFactory’}; |
virtual nc::ORBHelper::~ORBHelper () [virtual] Destructor Destroys orb_mp. |
nc::ORBHelper::ORBHelper (const ORBHelper &) [private] ALMA C++ coding standards state copy constructors should be disabled. |
CORBA::ORB_ptr nc::ORBHelper::getORB () const [inline] getORB() This method merely returns the ORB. |
Returns: |
A pointer to the orb spawned by this class. |
References orb_mp. |
void nc::ORBHelper::init_ORB (int argc, char * argv[]) [private] Called by ORBHelper(int argc, char *argv[]) It also initializes CORBA references, gets POA & POA manager, activates POA mgr. |
Parameters: |
argc Number of arguments to
CORBA::ORB_init(...) |
Exceptions: |
ACSErrTypeCommon::CORBAProblemEx |
Returns: |
void |
void nc::ORBHelper::init_ORB () [private] Called by ORBHelper() It also initializes CORBA references, gets POA & POA manager, activates POA mgr. |
Returns: |
void |
Exceptions: |
ACSErrTypeCommon::CORBAProblemEx |
void nc::ORBHelper::operator= (const ORBHelper &) [private] ALMA C++ coding standards state assignment operators should be disabled. |
void nc::ORBHelper::runOrb () Runs the orb in a separate thread. This has to be called manually! |
Returns: |
void |
Exceptions: |
ACSErrTypeCommon::CouldntCreateThreadEx |
static void* nc::ORBHelper::runOrbThread (void * pThis) [static, private] Run the orb in a BACI thread because orb_mp->run() is a blocking call. Called by runOrb. |
Parameters: |
pThis a pointer to ’this’. |
CORBA::ORB_ptr nc::ORBHelper::orb_mp [private] The orb created by this class |
Referenced by getORB(). |
baci::BACIThreadManager* nc::ORBHelper::threadManager_mp [private] Used to spawn a thread for running orb_mp. |
Generated automatically by Doxygen for ACS-2015.2 C++ API from the source code. |