Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TAO::ORB_Table Class Reference

Keep a table with all the ORBs in the system. More...

#include <ORB_Table.h>

Collaboration diagram for TAO::ORB_Table:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ACE_Hash_Map_Manager_Ex<
const char *, TAO_ORB_Core *,
ACE_Hash< const char * >,
ACE_Equal_To< const char * >,
ACE_Null_Mutex
Table
typedef Table::iterator Iterator

Public Member Functions

 ORB_Table (void)
 Constructor.
 ~ORB_Table (void)
 destructor
TAO_ORB_Core *const * get_orbs (size_t &num_orbs)
TAO_ORB_Corefirst_orb (void)
void set_default (char const *orb_id)
void not_default (char const *orb_id)
Tabletable (void)
 Accessor to the underlying table_.
Iterator begin (void)
Iterator end (void)
int bind (const char *orb_id, TAO_ORB_Core *orb_core)
TAO_ORB_Corefind (const char *orb_id)
int unbind (const char *orb_id)

Static Public Member Functions

ORB_Tableinstance (void)
 Return a unique instance.

Private Member Functions

 ORB_Table (const ORB_Table &)
void operator= (const ORB_Table &)
void update_orbs (void)
 Update our list of orbs.

Private Attributes

TAO_SYNCH_MUTEX lock_
 Lock used to synchronize access to the internal state.
bool first_orb_not_default_
Table table_
 The underlying table.
TAO_ORB_Corefirst_orb_
 The first ORB created by the user.
TAO_ORB_Core ** orbs_
 List of orbs for get_orbs call.
size_t num_orbs_
 Number of ORBs in the table.

Detailed Description

Keep a table with all the ORBs in the system.

CORBA::ORB_init() is supposed to return the same ORB if the user specifies the same ORBid, either in the ORB_init() parameter or in the -ORBid option. This class is used to implement that feature. It is also useful when trying to determine if an object reference is collocated or not.

Note:
This class should be instantiated via its instance() method. Normally this would be enforced by making the constructor protected but that forces a friend declaration containing a template type (TAO_Singleton) with a static member to be introduced. In turn, this potentially introduces problems in MS Windows DLL environments due to the occurance of multiple singleton instances. There should only be one!


Member Typedef Documentation

typedef Table::iterator TAO::ORB_Table::Iterator
 

typedef ACE_Hash_Map_Manager_Ex<const char *, TAO_ORB_Core *, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex> TAO::ORB_Table::Table
 


Constructor & Destructor Documentation

TAO::ORB_Table::ORB_Table void   ) 
 

Constructor.

Note:
See the note in the class description for an explanation of why this constructor is not protected.

TAO::ORB_Table::~ORB_Table void   ) 
 

destructor

TAO::ORB_Table::ORB_Table const ORB_Table  )  [private]
 


Member Function Documentation

TAO::ORB_Table::Iterator TAO::ORB_Table::begin void   ) 
 

int TAO::ORB_Table::bind const char *  orb_id,
TAO_ORB_Core orb_core
 

TAO::ORB_Table::Iterator TAO::ORB_Table::end void   ) 
 

TAO_ORB_Core * TAO::ORB_Table::find const char *  orb_id  ) 
 

Note:
The caller must decrease the reference count on the returned ORB_Core, i.e. the callers "owns" it.

ACE_INLINE TAO_ORB_Core * TAO::ORB_Table::first_orb void   ) 
 

Obtain the first ORB for the ORB_Core_instance() implementation.

TAO_ORB_Core *const * TAO::ORB_Table::get_orbs size_t &  num_orbs  ) 
 

TAO::ORB_Table * TAO::ORB_Table::instance void   )  [static]
 

Return a unique instance.

void TAO::ORB_Table::not_default char const *  orb_id  ) 
 

Method the ORB invokes to specify that it doesnt want to be the default ORB if there are more than one ORB registered.

void TAO::ORB_Table::operator= const ORB_Table  )  [private]
 

void TAO::ORB_Table::set_default char const *  orb_id  ) 
 

Set the ORB related to the orb_id as the default ORB and not the ORB that is first binded.

TAO::ORB_Table::Table * TAO::ORB_Table::table void   ) 
 

Accessor to the underlying table_.

int TAO::ORB_Table::unbind const char *  orb_id  ) 
 

void TAO::ORB_Table::update_orbs void   )  [private]
 

Update our list of orbs.


Member Data Documentation

TAO_ORB_Core* TAO::ORB_Table::first_orb_ [private]
 

The first ORB created by the user.

bool TAO::ORB_Table::first_orb_not_default_ [private]
 

Variable to check if the first ORB decides not to be the default.

TAO_SYNCH_MUTEX TAO::ORB_Table::lock_ [private]
 

Lock used to synchronize access to the internal state.

size_t TAO::ORB_Table::num_orbs_ [private]
 

Number of ORBs in the table.

TAO_ORB_Core** TAO::ORB_Table::orbs_ [private]
 

List of orbs for get_orbs call.

Table TAO::ORB_Table::table_ [private]
 

The underlying table.


The documentation for this class was generated from the following files:
Generated on Thu Jun 9 00:19:15 2005 for TAO by  doxygen 1.3.9.1