Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

TAO_Naming_Context Class Reference

This class plays a role of the 'Abstraction' (aka 'Interface') in the Bridge pattern architecture of the CosNaming::NamingContext implementation. More...

#include <Naming_Context_Interface.h>

Collaboration diagram for TAO_Naming_Context:

Collaboration graph
[legend]
List of all members.

Public Methods

 TAO_Naming_Context (TAO_Naming_Context_Impl *impl)
 Constructor. Initializes <impl_> with a concrete implementation.

 ~TAO_Naming_Context (void)
 Destructor.

virtual void bind (const CosNaming::Name &n, CORBA::Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC((CORBA
void to_name_helper (char *dest, const char *&src, Hint hint)
void to_string_helper_assign (char *&k, const char *&src)
void to_string_helper_length (CORBA::ULong &len, const char *&src)

Static Public Methods

int to_url_is_alnum_or_punctuation (char c)
size_t to_url_validate_and_compute_size (const char *add, const char *sn ACE_ENV_ARG_DECL)

Protected Attributes

TAO_Naming_Context_Implimpl_
 A concrete implementor of the NamingContext functions.


Detailed Description

This class plays a role of the 'Abstraction' (aka 'Interface') in the Bridge pattern architecture of the CosNaming::NamingContext implementation.

This class simply forwards all client requests to a concrete NamingContext implementation through its <impl_> pointer. See README file for more info. Comments for the idl methods describe methods semantics - actual actions are carried out by concrete implementors.


Constructor & Destructor Documentation

TAO_Naming_Context::TAO_Naming_Context TAO_Naming_Context_Impl   impl
 

Constructor. Initializes <impl_> with a concrete implementation.

TAO_Naming_Context::~TAO_Naming_Context void   
 

Destructor.


Member Function Documentation

void TAO_Naming_Context::bind const CosNaming::Name   n,
CORBA::Object_ptr obj    ACE_ENV_ARG_DECL
[inline, virtual]
 

Similar to <resolve> as in the CosNaming::NamingContext interface. It accepts a strigified name as an argument instead of a Name.

void TAO_Naming_Context::to_name_helper char *    dest,
const char *&    src,
Hint    hint
 

This private function is used as a helper to <to_name>. It reads character by character from 'src' and depending on the character, either assigns it to 'dest' or returns back to the calling function. If the character is a seperator between the 'id' and 'kind' fields or a seperator between two name components, the control is returned back to the calling function <to_name>.

void TAO_Naming_Context::to_string_helper_assign char *&    k,
const char *&    src
 

This method functions similar to <to_name_helper>. If the character read is '.' or '/' or '\', an escape character '\' is prepended before the character.

void TAO_Naming_Context::to_string_helper_length CORBA::ULong   len,
const char *&    src
 

This method helps count the number of characters in 'src' so that memory can be allocated for the return parameter. For all '.' , '/' and '\', the count is incremented by 'one' to account for the escape character that needs to be added. Seperators between 'id' and 'kind' as well as seperators between the name components are also counted.

int TAO_Naming_Context::to_url_is_alnum_or_punctuation char    c [static]
 

Return 1 if the character is alphanumeric or a non-scaped punctuation.

size_t TAO_Naming_Context::to_url_validate_and_compute_size const char *    add,
const char *sn    ACE_ENV_ARG_DECL
[static]
 

Validate the to_url() method input, and compute the size of the returned URL address.


Member Data Documentation

TAO_Naming_Context_Impl* TAO_Naming_Context::impl_ [protected]
 

A concrete implementor of the NamingContext functions.


The documentation for this class was generated from the following files:
Generated on Wed Feb 19 17:14:41 2003 for TAO_CosNaming by doxygen1.2.18