| 
    TAO_CosNaming
    2.0.8
    
   
   | 
  
  
  
 
Provides hash-table-based transient storage for name to object bindings in a Naming Context. More...
#include <Storable_Naming_Context.h>


Public Types | |
| typedef ACE_Hash_Map_Manager < TAO_Storable_ExtId, TAO_Storable_IntId, ACE_Null_Mutex >  | HASH_MAP | 
| Underlying data structure - typedef for ease of use.   | |
Public Member Functions | |
| TAO_Storable_Bindings_Map (size_t hash_table_size, CORBA::ORB_ptr orb) | |
| Constructor.   | |
| virtual | ~TAO_Storable_Bindings_Map (void) | 
| Destructor.   | |
| HASH_MAP & | map (void) | 
| Get a reference to the underlying hash map.   | |
| size_t | total_size (void) | 
| Return the size of the underlying hash table.   | |
| virtual size_t | current_size (void) | 
| virtual int | bind (const char *id, const char *kind, CORBA::Object_ptr obj, CosNaming::BindingType type) | 
| virtual int | rebind (const char *id, const char *kind, CORBA::Object_ptr obj, CosNaming::BindingType type) | 
| virtual int | unbind (const char *id, const char *kind) | 
| virtual int | find (const char *id, const char *kind, CORBA::Object_ptr &obj, CosNaming::BindingType &type) | 
Private Member Functions | |
| int | shared_bind (const char *id, const char *kind, CORBA::Object_ptr obj, CosNaming::BindingType type, int rebind) | 
| Helper: factors common code from <bind> and <rebind>.   | |
Private Attributes | |
| HASH_MAP | map_ | 
| Hash map used for storage.   | |
| CORBA::ORB_var | orb_ | 
Provides hash-table-based transient storage for name to object bindings in a Naming Context.
A thin wrapper on top of ACE_Hash_Map_Manager. Supports TAO_Bindings_Map interface. Used by TAO_Transient_Naming_Context.
| typedef ACE_Hash_Map_Manager<TAO_Storable_ExtId, TAO_Storable_IntId, ACE_Null_Mutex> TAO_Storable_Bindings_Map::HASH_MAP | 
Underlying data structure - typedef for ease of use.
| TAO_Storable_Bindings_Map::TAO_Storable_Bindings_Map | ( | size_t | hash_table_size, | 
| CORBA::ORB_ptr | orb | ||
| ) | 
Constructor.
| TAO_Storable_Bindings_Map::~TAO_Storable_Bindings_Map | ( | void | ) |  [virtual] | 
        
Destructor.
| int TAO_Storable_Bindings_Map::bind | ( | const char * | id, | 
| const char * | kind, | ||
| CORBA::Object_ptr | obj, | ||
| CosNaming::BindingType | type | ||
| ) |  [virtual] | 
        
Add a binding with the specified parameters to the table. Return 0 on success and -1 on failure, 1 if there already is a binding with <id> and <kind>.
Implements TAO_Bindings_Map.
| size_t TAO_Storable_Bindings_Map::current_size | ( | void | ) |  [virtual] | 
        
Return current number of entries (name bindings) in the underlying hash map.
Implements TAO_Bindings_Map.
| int TAO_Storable_Bindings_Map::find | ( | const char * | id, | 
| const char * | kind, | ||
| CORBA::Object_ptr & | obj, | ||
| CosNaming::BindingType & | type | ||
| ) |  [virtual] | 
        
Find the binding containing <id> and <kind> in the table, and pass binding's type and object back to the caller by reference. Return 0 on success and -1 on failure. Note: a 'duplicated' object reference is assigned to <obj>, so the caller is responsible for its deallocation.
Implements TAO_Bindings_Map.
| TAO_Storable_Bindings_Map::HASH_MAP & TAO_Storable_Bindings_Map::map | ( | void | ) | 
Get a reference to the underlying hash map.
| int TAO_Storable_Bindings_Map::rebind | ( | const char * | id, | 
| const char * | kind, | ||
| CORBA::Object_ptr | obj, | ||
| CosNaming::BindingType | type | ||
| ) |  [virtual] | 
        
Overwrite a binding containing <id> and <kind> (or create a new one if one doesn't exist) with the specified parameters. Return 0 or 1 on success. Return -1 or -2 on failure. (-2 is returned if the new and old bindings differ in type).
Implements TAO_Bindings_Map.
| int TAO_Storable_Bindings_Map::shared_bind | ( | const char * | id, | 
| const char * | kind, | ||
| CORBA::Object_ptr | obj, | ||
| CosNaming::BindingType | type, | ||
| int | rebind | ||
| ) |  [private] | 
        
Helper: factors common code from <bind> and <rebind>.
| size_t TAO_Storable_Bindings_Map::total_size | ( | void | ) | 
Return the size of the underlying hash table.
| int TAO_Storable_Bindings_Map::unbind | ( | const char * | id, | 
| const char * | kind | ||
| ) |  [virtual] | 
        
Remove a binding containing <id> and <kind> from the table. Return 0 on success and -1 on failure.
Implements TAO_Bindings_Map.
HASH_MAP TAO_Storable_Bindings_Map::map_ [private] | 
        
Hash map used for storage.
 1.7.5.1