RTC::CorbaNaming Class Reference

CORBA Naming Service helper class. More...

#include <CorbaNaming.h>

List of all members.

Public Types

typedef CORBA::SystemException SystemException
typedef
CosNaming::NamingContext::NotFound 
NotFound
typedef
CosNaming::NamingContext::CannotProceed 
CannotProceed
typedef
CosNaming::NamingContext::InvalidName 
InvalidName
typedef
CosNaming::NamingContext::AlreadyBound 
AlreadyBound
typedef
CosNaming::NamingContext::NotEmpty 
NotEmpty
typedef
CosNaming::NamingContextExt::InvalidAddress 
InvalidAddress
typedef std::vector
< CORBA::Object_ptr > 
ObjectList

Public Member Functions

 CorbaNaming (CORBA::ORB_ptr orb)
 Consructor.
 CorbaNaming (CORBA::ORB_ptr orb, const char *name_server)
 Consructor.
virtual ~CorbaNaming (void)
 Virtual destructor.
void init (const char *name_server)
 Initialize the Naming Service.
bool isAlive ()
void bind (const CosNaming::Name &name, CORBA::Object_ptr obj, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 Bind object on specified name component position.
void bindByString (const char *string_name, CORBA::Object_ptr obj, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 Bind object on specified string name position.
void bindRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj) throw (SystemException, CannotProceed, InvalidName, AlreadyBound)
 Bind intermediate context recursively and bind object.
void rebind (const CosNaming::Name &name, CORBA::Object_ptr obj, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Rebind object.
void rebindByString (const char *string_name, CORBA::Object_ptr obj, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Rebind Object.
void rebindRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj) throw (SystemException, CannotProceed, InvalidName)
 Bind intermediate context recursively and rebind object.
void bindContext (const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 Bind NamingContext.
void bindContext (const char *string_name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 Bind NamingContext.
void bindContextRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt)
 Bind intermediate context recursively and bind NamingContext.
void rebindContext (const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Rebind NamingContext.
void rebindContext (const char *string_name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Rebind NamingContext.
void rebindContextRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt)
 Rebind intermediate context recursively and rebind NamingContext.
CORBA::Object_ptr resolve (const CosNaming::Name &name) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Return object bound on the specified NameComponent.
CORBA::Object_ptr resolve (const char *string_name) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Return object bound on the specified name.
void unbind (const CosNaming::Name &name) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Unbind a binding specified by NameComponent.
void unbind (const char *string_name) throw (SystemException, NotFound, CannotProceed, InvalidName)
 Unbind a binding specified by string representation.
CosNaming::NamingContext_ptr newContext ()
 Create new NamingContext.
CosNaming::NamingContext_ptr bindNewContext (const CosNaming::Name &name, bool force=true) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 Bind new NamingContext.
CosNaming::NamingContext_ptr bindNewContext (const char *string_name, bool force=true) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 Bind new NamingContext.
void destroy (CosNaming::NamingContext_ptr context) throw (SystemException, NotEmpty)
 Destroy the naming context.
void destroyRecursive (CosNaming::NamingContext_ptr context) throw (SystemException, NotEmpty, NotFound, CannotProceed, InvalidName)
 Destroy the naming context recursively.
void clearAll ()
 Destroy all bindings.
void list (CosNaming::NamingContext_ptr name_cxt, CORBA::ULong how_many, CosNaming::BindingList_var &bl, CosNaming::BindingIterator_var &bi)
 Get Binding of the given NamingContext.
char * toString (const CosNaming::Name &name) throw (SystemException, InvalidName)
 Get string representation of given NameComponent.
CosNaming::Name toName (const char *string_name) throw (SystemException, InvalidName)
 Resolve given string representation to NameComponent.
char * toUrl (char *addr, char *string_name) throw (SystemException, InvalidAddress, InvalidName)
 Get URL representation from given addr and string_name.
CORBA::Object_ptr resolveStr (const char *string_name) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 Resolve from name of string representation and get object.
CORBA::Object_ptr bindOrResolve (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj)
 Bind or resolve the given name component.
CosNaming::NamingContext_ptr bindOrResolveContext (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr new_context)
 Bind or resolve the given name component.
CosNaming::NamingContext_ptr bindOrResolveContext (CosNaming::NamingContext_ptr context, const CosNaming::Name &name)
 Bind or resolve the given name component.
const char * getNameServer ()
 Get the name of name server.
CosNaming::NamingContext_ptr getRootContext ()
 Get the root context.
bool isNamingContext (CORBA::Object_ptr obj)
 Determine whether the object is NamingContext.
bool isNamingContext (const CosNaming::Name &name)
 Determine whether the given name component is NamingContext.
bool isNamingContext (const char *string_name)
 Determine whether the given string name is NamingContext.
CosNaming::Name subName (const CosNaming::Name &name, CORBA::Long begin, CORBA::Long end=-1)
 Get subset of given name component.

Protected Member Functions

void nameToString (const CosNaming::Name &name, char *string_name, CORBA::ULong slen)
 Get string representation of name component.
CORBA::ULong getNameLength (const CosNaming::Name &name)
 Get string length of the name component's string representation.
unsigned int split (const std::string &input, const std::string &delimiter, std::vector< std::string > &results)
 Split of string.

Protected Attributes

CORBA::ORB_var m_varORB
 ORB.
std::string m_nameServer
 Name of the name server.
CosNaming::NamingContextExt_var m_rootContext
 The root context of specified name server.

Detailed Description

CORBA Naming Service helper class.

This class is a wrapper class of CosNaming::NamingContext. Almost the same operations which CosNaming::NamingContext has are provided, and some operation allows string naming representation of context and object instead of CosNaming::Name.

The object of the class would connect to a CORBA naming server at the instantiation or immediately after instantiation. After that the object invokes operations to the root context of it. This class realizes forced binding to deep NamingContext, without binding intermediate NamingContexts explicitly.

Since:
0.4.0

Member Typedef Documentation

typedef CosNaming::NamingContext::AlreadyBound RTC::CorbaNaming::AlreadyBound
typedef CosNaming::NamingContext::CannotProceed RTC::CorbaNaming::CannotProceed
typedef CosNaming::NamingContextExt::InvalidAddress RTC::CorbaNaming::InvalidAddress
typedef CosNaming::NamingContext::InvalidName RTC::CorbaNaming::InvalidName
typedef CosNaming::NamingContext::NotEmpty RTC::CorbaNaming::NotEmpty
typedef CosNaming::NamingContext::NotFound RTC::CorbaNaming::NotFound
typedef std::vector<CORBA::Object_ptr> RTC::CorbaNaming::ObjectList
typedef CORBA::SystemException RTC::CorbaNaming::SystemException

Constructor & Destructor Documentation

RTC::CorbaNaming::CorbaNaming ( CORBA::ORB_ptr  orb  ) 

Consructor.

Parameters:
orb ORB
RTC::CorbaNaming::CorbaNaming ( CORBA::ORB_ptr  orb,
const char *  name_server 
)

Consructor.

Parameters:
orb ORB
name_server Name of the name server
virtual RTC::CorbaNaming::~CorbaNaming ( void   )  [inline, virtual]

Virtual destructor.


Member Function Documentation

void RTC::CorbaNaming::bind ( const CosNaming::Name &  name,
CORBA::Object_ptr  obj,
const bool  force = 1 
) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)

Bind object on specified name component position.

Almost the same operation as CosNaming::bind(), but there is a difference that bind() is invoked for the root context of the given name server.

Bind between Name <name> and Object <obj> on this NamingContext. If c_n indicates the n-th of NameComponent, when name consists of n pieces of NameComponent, it is handled as follows.

cxt->bind(<c_1, c_2, ... c_n>, obj) is the same as the following operation. cxt->resolve(<c_1, ... c_(n-1)>)->bind(<c_n>, obj)

In other word, resolve from the first to the (n-1)th context and bind obj as name<n> on the (n-1)th context. NemingContext of <c_1, ... c_(n-1)> for resolving name must be already bound in bindContext() or rebindContext(). If NamingContext of <c_1, ... c_(n-1)> does not exist, NotFound excption will occur.

However, when flag of forced bind is true, even if <c_1, ... c_(n-1)> does not exist, finally obj will be bound to name name <c_n> by binding to the context recursively.

Even in any case, if the object of name<n> (Object or context) is bound on the (n-1)th context, AlreadyBound exception will occur.

Parameters:
name NameComponent of name applied to object
obj Object that is associated
force If true, the intermediate context is bound forcibly. (The default value:true)
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName The argument 'name' is invalid.
AlreadyBound The object of name<c_n> is already bound.
void RTC::CorbaNaming::bindByString ( const char *  string_name,
CORBA::Object_ptr  obj,
const bool  force = 1 
) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)

Bind object on specified string name position.

This is the same as bind() except as the given name is string representation when Object is bound. bind(toName(string_name),obj) is the same.

Parameters:
string_name The string representation of name applied to object
obj Object that is associated
force If true, the intermediate context is bound forcibly. (The default value:true)
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName The argument 'name' is invalid.
AlreadyBound The object of name<c_n> is already bound.
void RTC::CorbaNaming::bindContext ( const char *  string_name,
CosNaming::NamingContext_ptr  name_cxt,
const bool  force = 1 
) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)

Bind NamingContext.

This is the same as bindByString() except as the bound object is NamingContext.

Parameters:
string_name String representation of name applied to object
name_cxt NamingContext that is associated
force If true, the intermediate context is bound forcibly. (The default value:true)
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName The argument 'name' is invalid.
AlreadyBound The object of name<n> is already bound.
void RTC::CorbaNaming::bindContext ( const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  name_cxt,
const bool  force = 1 
) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)

Bind NamingContext.

This is the same as bind() except as the bound object is NamingContext.

Parameters:
name NameComponent of name applied to object
name_cxt Object that is associated
force If true, the intermediate context is bound forcibly. (The default value:true)
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName The argument 'name' is invalid.
AlreadyBound The object of name<c_n> is already bound.
void RTC::CorbaNaming::bindContextRecursive ( CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  name_cxt 
)

Bind intermediate context recursively and bind NamingContext.

This is the same as bindRecursive() except as the bound object is NamingContext.

Parameters:
context NamingContext that starts the bind
name NameComponent of name applied to object
name_cxt NamingContext that is associated
CosNaming::NamingContext_ptr RTC::CorbaNaming::bindNewContext ( const char *  string_name,
bool  force = true 
) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)

Bind new NamingContext.

Bind new context corresponding to the given string. The created NamingContext is a creation on the name server.

Parameters:
string_name The string representation of name applied to NamingContext
force If true, the intermediate context is bound forcibly. (The default value:true)
Returns:
New created NamingContext
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName The argument 'name' is invalid.
AlreadyBound The object of name<n> is already bound.
CosNaming::NamingContext_ptr RTC::CorbaNaming::bindNewContext ( const CosNaming::Name &  name,
bool  force = true 
) throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)

Bind new NamingContext.

Bind new context for the given name. The created NamingContext is a creation on the name server.

Parameters:
name NameComponent applied to NamingContext
force If true, the intermediate context is bound forcibly. (The default value:true)
Returns:
New created NamingContext
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName The argument 'name' is invalid.
AlreadyBound The object of name<n> is already bound.
CORBA::Object_ptr RTC::CorbaNaming::bindOrResolve ( CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CORBA::Object_ptr  obj 
)

Bind or resolve the given name component.

Bind object at the position that specified in NameComponent for the specified context. When other elements are already bound at the same position, get the already bound element.

Parameters:
context The context to bind or resole
name NameComponent applied to object
obj Object that is associated
Returns:
The object that is bound at position specified with NameComponent
CosNaming::NamingContext_ptr RTC::CorbaNaming::bindOrResolveContext ( CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name 
)

Bind or resolve the given name component.

Bind new Context at the position that specified in NameComponent for the specified context. When other elements are already bound at the same position, get the already bound element.

Parameters:
context The context to bind or resole
name NameComponent that indicates the position of new context
Returns:
The Context that is bound at the position specified with NameComponent
CosNaming::NamingContext_ptr RTC::CorbaNaming::bindOrResolveContext ( CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  new_context 
)

Bind or resolve the given name component.

Bind Context at the position that specified in NameComponent for the specified context. When other elements are already bound at the same position, get the already bound element.

Parameters:
context The context to bind or resole
name NameComponent applied to object
new_context Context that is associated
Returns:
The Context that is bound at the position specified with NameComponent
void RTC::CorbaNaming::bindRecursive ( CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CORBA::Object_ptr  obj 
) throw (SystemException, CannotProceed, InvalidName, AlreadyBound)

Bind intermediate context recursively and bind object.

For NamingContext given in context, bind obj to name <c_n> with solving name component <c_1, ... c_(n-1)> specified by name as NamingContext. Bind new NamingContext when there is no NamingContext corresponding to c_(n-1) >.

Finally, NamingContext corresponding to <c_1, c_2, ..., c_(n-1)> will be generated, or CosNaming::bind(<c_n>, object) will be invoked after solving. At this time, if the binding already exists, the AlreadyBound exception will occur.

During process, when Binding that is not NamingContext of the same name as the context for solving exists, CannotProceed exception will occur and stop processing.

Parameters:
context NamingContext that starts the bind
name NameComponent of name applied to object
obj Object that is associated
Exceptions:
CannotProceed Since one of NamingContext corresponding to <c_1, ..., c_(n-1)> is already bound to object other than NamingContext and processing cannot be continued
InvalidName name 'name' is invalid.
AlreadyBound The object of name<c_n> is already bound.
void RTC::CorbaNaming::clearAll (  ) 

Destroy all bindings.

Destroy all bindings that are registered.

void RTC::CorbaNaming::destroy ( CosNaming::NamingContext_ptr  context  )  throw (SystemException, NotEmpty)

Destroy the naming context.

Destroy the specified naming context. Any bindings should be <unbind> in which the given context is bound to some names before invoking <destroy> operation on it.

Parameters:
context NamingContext which is destroied.
Exceptions:
NotEmpty The target context is bound to the other context.
void RTC::CorbaNaming::destroyRecursive ( CosNaming::NamingContext_ptr  context  )  throw (SystemException, NotEmpty, NotFound, CannotProceed, InvalidName)

Destroy the naming context recursively.

For NamingContext given by Context, Destroy name <c_n> with solving the name component specified by name as NamingContext recursively.

Parameters:
context NamingContext which is Destroied.
Exceptions:
NotEmpty The target context is bound to the other context.
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName The argument 'name' is invalid.
CORBA::ULong RTC::CorbaNaming::getNameLength ( const CosNaming::Name &  name  )  [protected]

Get string length of the name component's string representation.

Get string length of the name component's string representation. In string representation, if NameComponent consists of {Nc[0],Nc[1],Nc[2]・・・}, the format of Nc[0]id.Nc[0].kind/Nc[1]id.Nc[1].kind/Nc[2].id/Nc[2].kind・・・ will be got.

Parameters:
name The getting target NameComponent
Returns:
The string length value of specified component
const char* RTC::CorbaNaming::getNameServer (  ) 

Get the name of name server.

Get the configured name of name server

Returns:
The name of name server
CosNaming::NamingContext_ptr RTC::CorbaNaming::getRootContext (  ) 

Get the root context.

Get the root context of the configured name server

Returns:
Root context ot name server
void RTC::CorbaNaming::init ( const char *  name_server  ) 

Initialize the Naming Service.

Initialize the Naming Service on the specified name server.

Parameters:
name_server Name of the name server
bool RTC::CorbaNaming::isAlive (  ) 
bool RTC::CorbaNaming::isNamingContext ( const char *  string_name  ) 

Determine whether the given string name is NamingContext.

Determine whether the element specified by string name is NamingContext

Parameters:
string_name The string representation for determination
Returns:
Determination result (NamingContext:true, Else:false)
bool RTC::CorbaNaming::isNamingContext ( const CosNaming::Name &  name  ) 

Determine whether the given name component is NamingContext.

Determine whether the specified element is NameComponent

Parameters:
name The target NameComponent for determination
Returns:
Determination result (NamingContext:true, Else:false)
bool RTC::CorbaNaming::isNamingContext ( CORBA::Object_ptr  obj  ) 

Determine whether the object is NamingContext.

Determine whether the specified element is NamingContext

Parameters:
obj The target element for determination
Returns:
Determination result (NamingContext:true, Else:false)
void RTC::CorbaNaming::list ( CosNaming::NamingContext_ptr  name_cxt,
CORBA::ULong  how_many,
CosNaming::BindingList_var &  bl,
CosNaming::BindingIterator_var &  bi 
)

Get Binding of the given NamingContext.

Get Binding of the given NamingContext.

Parameters:
name_cxt NamingContext of the getting target Binding
how_many The depth to get Binding
bl The holder to hold the got Binding
bi The iterator to detect the got Binding
void RTC::CorbaNaming::nameToString ( const CosNaming::Name &  name,
char *  string_name,
CORBA::ULong  slen 
) [protected]

Get string representation of name component.

Get string representation of the name component in specified range. In string representation, if NameComponent consists of {Nc[0],Nc[1],Nc[2]...}, the format of Nc[0]id.Nc[0].kind/Nc[1]id.Nc[1].kind/Nc[2].id/Nc[2].kind... will be got. It is rounded by the specified length when the length of the got string is over the specified length.

Parameters:
name The getting target NameComponent
string_name The string of getting result
slen The maximum length value of getting string
CosNaming::NamingContext_ptr RTC::CorbaNaming::newContext (  ) 

Create new NamingContext.

Return NamingContext that has been created on the given name server. The returned NamingContext has not bound yet.

Returns:
New created NamingContext
void RTC::CorbaNaming::rebind ( const CosNaming::Name &  name,
CORBA::Object_ptr  obj,
const bool  force = 1 
) throw (SystemException, NotFound, CannotProceed, InvalidName)

Rebind object.

This is the same as bind() except as Binding specified by name already exists. If the binding already exists, new binding will be replaced.

Parameters:
name NameComponent of name applied to object
obj Object that is associated
force If true, the intermediate context is bound forcibly. (The default value:true)
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName Name 'name' is invalid.
void RTC::CorbaNaming::rebindByString ( const char *  string_name,
CORBA::Object_ptr  obj,
const bool  force = 1 
) throw (SystemException, NotFound, CannotProceed, InvalidName)

Rebind Object.

This is the same as rebind() except as the given name is string representation when object is rebound. rebind(toName(string_name), obj) is the same.

Parameters:
string_name NameComponent of name applied to object
obj Object that is associated
force If true, the intermediate context is bound forcibly. (The default value:true)
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName The argument 'name' is invalid.
void RTC::CorbaNaming::rebindContext ( const char *  string_name,
CosNaming::NamingContext_ptr  name_cxt,
const bool  force = 1 
) throw (SystemException, NotFound, CannotProceed, InvalidName)

Rebind NamingContext.

This is the same as bindContext() except as context specified by name already exists. If the binding already exists, new binding will be replaced.

Parameters:
string_name String representation of name applied to object
name_cxt NamingContext that is associated
force If true, the intermediate context is bound forcibly. (The default value:true)
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName The argument 'name' is invalid.
void RTC::CorbaNaming::rebindContext ( const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  name_cxt,
const bool  force = 1 
) throw (SystemException, NotFound, CannotProceed, InvalidName)

Rebind NamingContext.

This is the same as bindContext() except as context specified by name already exists. If the binding already exists, new binding will be replaced.

Parameters:
name NameComponent applied to object
name_cxt Object that is associated
force If true, the intermediate context is bound forcibly. (The default value:true)
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName the argument 'name' is invalid.
void RTC::CorbaNaming::rebindContextRecursive ( CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  name_cxt 
)

Rebind intermediate context recursively and rebind NamingContext.

This is the same as rebindRecursive() except as the bound object is NamingContext.

Parameters:
context NamingContext that starts the bind
name NameComponent applied to object
name_cxt NamingContext that is associated
void RTC::CorbaNaming::rebindRecursive ( CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CORBA::Object_ptr  obj 
) throw (SystemException, CannotProceed, InvalidName)

Bind intermediate context recursively and rebind object.

This is the same as bindRecursive() except as NamingContext or Object specified by name <c_n> already exists.

If the binding specified by name <c_n> already exists, new binding will be replaced.

Parameters:
context NamingContext that starts the bind
name NameComponent of name applied to object
obj Object that is associated
Exceptions:
CannotProceed The intermediate context cannot resolved.
InvalidName The given name is invalid.
CORBA::Object_ptr RTC::CorbaNaming::resolve ( const char *  string_name  )  throw (SystemException, NotFound, CannotProceed, InvalidName)

Return object bound on the specified name.

Return the object reference that is bound to name. Resolve the name component<c_1, c_2, ... c_n> recursively.

Almost the same operation as CosNaming::resolve(), but there is a difference that resolve() is invoked for the root context of the given name server.

Parameters:
string_name The string representation of object name that should be resolved
Returns:
The reference to the resolved object
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName The argument 'name' is invalid.
CORBA::Object_ptr RTC::CorbaNaming::resolve ( const CosNaming::Name &  name  )  throw (SystemException, NotFound, CannotProceed, InvalidName)

Return object bound on the specified NameComponent.

Return the object reference that is bound to name. Resolve the name component<c_1, c_2, ... c_n> recursively.

Almost the same operation as CosNaming::resolve(), but there is a difference that resolve() is invoked for the root context of the given name server.

Parameters:
name The name component of object name that should be resolved
Returns:
The reference to the resolved object
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName The argument 'name' is invalid.
CORBA::Object_ptr RTC::CorbaNaming::resolveStr ( const char *  string_name  )  throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)

Resolve from name of string representation and get object.

Resolve specified string representation and get object

Parameters:
string_name The string representation of getting target object
Returns:
The resolved object
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName The argument 'name' is invalid.
AlreadyBound The object of name<n> is already bound.
unsigned int RTC::CorbaNaming::split ( const std::string &  input,
const std::string &  delimiter,
std::vector< std::string > &  results 
) [protected]

Split of string.

Split string with specified delimiter.

Parameters:
input The split target string
delimiter The delimiter for split
results Split result
Returns:
The number of split string elements
CosNaming::Name RTC::CorbaNaming::subName ( const CosNaming::Name &  name,
CORBA::Long  begin,
CORBA::Long  end = -1 
)

Get subset of given name component.

Get the name component in specified range. Return the name component except the last element if the end position is not specified.

Parameters:
name The target NameComponent for search
begin The beginning position for getting range
end The end position for getting range (The default value:-1)
Returns:
NameComponent Getting result
CosNaming::Name RTC::CorbaNaming::toName ( const char *  string_name  )  throw (SystemException, InvalidName)

Resolve given string representation to NameComponent.

Transform given string representation to NameComponent.

Parameters:
string_name The target string representation to transform
Returns:
NameComponent The result of transformation
Exceptions:
InvalidName The argument 'name' is invalid.
char* RTC::CorbaNaming::toString ( const CosNaming::Name &  name  )  throw (SystemException, InvalidName)

Get string representation of given NameComponent.

Transform specified NameComponent into string representation.

Parameters:
name The target NameComponent for transformation
Returns:
Trnasformation result of string representation
Exceptions:
InvalidName The argument 'name' is invalid.
char* RTC::CorbaNaming::toUrl ( char *  addr,
char *  string_name 
) throw (SystemException, InvalidAddress, InvalidName)

Get URL representation from given addr and string_name.

Convert specified addr and string_name into URL

Parameters:
addr The target address for conversion
string_name The target name for conversion
Returns:
URL Conversion result
Exceptions:
InvalidAddress The argument 'addr' is invalid.
InvalidName The argument 'string_name' is invalid.
void RTC::CorbaNaming::unbind ( const char *  string_name  )  throw (SystemException, NotFound, CannotProceed, InvalidName)

Unbind a binding specified by string representation.

Return the object reference that is bound to name. Resolve the name component<c_1, c_2, ... c_n> recursively.

Almost the same operation as CosNaming::unbind(), but there is a difference that unbind() is invoked for the root context of the always given name server.

Parameters:
string_name The string representation of object name that should be resolved
Returns:
The resolved object reference
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName The argument 'name' is invalid.
void RTC::CorbaNaming::unbind ( const CosNaming::Name &  name  )  throw (SystemException, NotFound, CannotProceed, InvalidName)

Unbind a binding specified by NameComponent.

Return the object reference that is bound to name. Resolve the name component<c_1, c_2, ... c_n> recursively.

Almost the same operation as CosNaming::unbind(), but there is a difference that unbind() is invoked for the root context of the always given name server.

Parameters:
name The name component of the deleted object
Exceptions:
NotFound There is not <c_1, c_2, ..., c_(n-1)>.
CannotProceed Processing cannot be continued for some reasons.
InvalidName The argument 'name' is invalid.

Member Data Documentation

std::string RTC::CorbaNaming::m_nameServer [protected]

Name of the name server.

CosNaming::NamingContextExt_var RTC::CorbaNaming::m_rootContext [protected]

The root context of specified name server.

CORBA::ORB_var RTC::CorbaNaming::m_varORB [protected]

ORB.

Generated on Fri Oct 28 18:31:18 2016 for OpenRTM-aist by  doxygen 1.6.3