TAO_CosNaming  2.0.8
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
TAO_Transient_Naming_Context Class Reference

This class plays a role of a 'ConcreteImplementor' in the Bridge pattern architecture of the CosNaming::NamingContext implementation. More...

#include <Transient_Naming_Context.h>

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

List of all members.

Public Types

typedef
TAO_Transient_Bindings_Map::HASH_MAP 
HASH_MAP
 Underlying data structure - typedef for ease of use.

Public Member Functions

 TAO_Transient_Naming_Context (PortableServer::POA_ptr poa, const char *poa_id, size_t hash_table_size=ACE_DEFAULT_MAP_SIZE)
 Constructor.
virtual ~TAO_Transient_Naming_Context (void)
 Destructor.
virtual
CosNaming::NamingContext_ptr 
new_context (void)
virtual void list (CORBA::ULong how_many, CosNaming::BindingList_out &bl, CosNaming::BindingIterator_out &bi)

Static Public Member Functions

static CosNaming::NamingContext_ptr make_new_context (PortableServer::POA_ptr poa, const char *poa_id, size_t context_size)

Protected Attributes

ACE_UINT32 counter_
TAO_Transient_Bindings_Maptransient_context_

Detailed Description

This class plays a role of a 'ConcreteImplementor' in the Bridge pattern architecture of the CosNaming::NamingContext implementation.

This class provides a transient implementation of the NamingContext functionality, i.e., the state is not preserved across process boundaries. Derives from TAO_Hash_Naming_Context and uses TAO_Transient_Bindings_Map to store name to object bindings.


Member Typedef Documentation

Underlying data structure - typedef for ease of use.


Constructor & Destructor Documentation

TAO_Transient_Naming_Context::TAO_Transient_Naming_Context ( PortableServer::POA_ptr  poa,
const char *  poa_id,
size_t  hash_table_size = ACE_DEFAULT_MAP_SIZE 
)

Constructor.

TAO_Transient_Naming_Context::~TAO_Transient_Naming_Context ( void  ) [virtual]

Destructor.


Member Function Documentation

void TAO_Transient_Naming_Context::list ( CORBA::ULong  how_many,
CosNaming::BindingList_out &  bl,
CosNaming::BindingIterator_out &  bi 
) [virtual]

Returns at most the requested number of bindings <how_many> in <bl>. If the naming context contains additional bindings, they are returned with a BindingIterator. In the naming context does not contain any additional bindings <bi> returned as null.

Implements TAO_Naming_Context_Impl.

CosNaming::NamingContext_ptr TAO_Transient_Naming_Context::make_new_context ( PortableServer::POA_ptr  poa,
const char *  poa_id,
size_t  context_size 
) [static]

This utility method factors out the code needed to create a new Transient Naming Context servant and activate it under the specified POA with the specified id. This function is static so that the code can be used, both from inside the class (e.g., <new_context>), and from outside (e.g., Naming_Utils.cpp).

CosNaming::NamingContext_ptr TAO_Transient_Naming_Context::new_context ( void  ) [virtual]

This operation returns a new naming context implemented by the same naming server in which the operation was invoked. The context is not bound.

Implements TAO_Naming_Context_Impl.


Member Data Documentation

Counter used for generation of POA ids for children Naming Contexts.

A pointer to the underlying data structure used to store name bindings. While our superclass (TAO_Hash_Naming_Context) also maintains a pointer to the data structure, keeping this pointer around saves us from the need to downcast when invoking non-virtual methods.


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