TAO 2.0.4
|
Keep a table de-stringified object references registered with the ORB. More...
#include <Object_Ref_Table.h>
Public Types | |
typedef ACE_Array_Map < CORBA::String_var, CORBA::Object_var, TAO::String_Var_Equal_To > | Table |
typedef Table::iterator | iterator |
Public Member Functions | |
TAO_Object_Ref_Table (void) | |
Constructor. | |
int | register_initial_reference (const char *id, CORBA::Object_ptr obj, bool rebind=false) |
CORBA::Object_ptr | unregister_initial_reference (const char *id) |
CORBA::Object_ptr | resolve_initial_reference (const char *id) |
void | destroy (void) |
Explicitly destroy the contents of the object reference table. | |
size_t | current_size (void) const |
Return the current size of the underlying table. | |
Forward Iterators | |
iterator | begin (void) |
iterator | end (void) |
Private Member Functions | |
TAO_Object_Ref_Table (const TAO_Object_Ref_Table &) | |
void | operator= (const TAO_Object_Ref_Table &) |
The canonical ACE_Map methods | |
int | bind_i (const char *orb_id, CORBA::Object_ptr obj) |
CORBA::Object_ptr | find_i (const char *orb_id) |
int | unbind_i (const char *orb_id) |
Private Attributes | |
Table | table_ |
The implementation. | |
TAO_SYNCH_MUTEX | lock_ |
Table synchronization lock. |
Keep a table de-stringified object references registered with the ORB.
The class is necessary to allow local objects to be accessible via the resolve_initial_references() mechanism. Since local object references cannot be stringified, they cannot be placed into the initial reference map that maps object key/name to stringified object reference. Hence, another table is needed.
typedef ACE_Array_Map<CORBA::String_var, CORBA::Object_var, TAO::String_Var_Equal_To> TAO_Object_Ref_Table::Table |
TAO_Object_Ref_Table::TAO_Object_Ref_Table | ( | void | ) |
Constructor.
TAO_Object_Ref_Table::TAO_Object_Ref_Table | ( | const TAO_Object_Ref_Table & | ) | [private] |
TAO_Object_Ref_Table::iterator TAO_Object_Ref_Table::begin | ( | void | ) |
int TAO_Object_Ref_Table::bind_i | ( | const char * | orb_id, |
CORBA::Object_ptr | obj | ||
) | [private] |
size_t TAO_Object_Ref_Table::current_size | ( | void | ) | const |
Return the current size of the underlying table.
void TAO_Object_Ref_Table::destroy | ( | void | ) |
Explicitly destroy the contents of the object reference table.
TAO_Object_Ref_Table::iterator TAO_Object_Ref_Table::end | ( | void | ) |
CORBA::Object_ptr TAO_Object_Ref_Table::find_i | ( | const char * | orb_id | ) | [private] |
void TAO_Object_Ref_Table::operator= | ( | const TAO_Object_Ref_Table & | ) | [private] |
int TAO_Object_Ref_Table::register_initial_reference | ( | const char * | id, |
CORBA::Object_ptr | obj, | ||
bool | rebind = false |
||
) |
Register an object reference with the table, and map the given ID to it.
0 | Success |
-1 | Duplicate id if rebind is false |
CORBA::Object_ptr TAO_Object_Ref_Table::resolve_initial_reference | ( | const char * | id | ) |
Return the object reference associated with the given ID. A duplicate is returned.
int TAO_Object_Ref_Table::unbind_i | ( | const char * | orb_id | ) | [private] |
CORBA::Object_ptr TAO_Object_Ref_Table::unregister_initial_reference | ( | const char * | id | ) |
Unregister an object reference with the table
TAO_SYNCH_MUTEX TAO_Object_Ref_Table::lock_ [private] |
Table synchronization lock.
Table TAO_Object_Ref_Table::table_ [private] |
The implementation.