Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

RTC::CorbaNaming Class Reference

CORBA Naming Service helper class. More...

#include <CorbaNaming.h>

List of all members.

Public Types

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)
 CorbaNaming (CORBA::ORB_ptr orb, const char *name_server)
virtual ~CorbaNaming ()
void init (const char *name_server)
void bind (const CosNaming::Name &name, CORBA::Object_ptr obj, const bool force=1) throw (NotFound, CannotProceed, InvalidName, AlreadyBound)
void bindByString (const char *string_name, CORBA::Object_ptr obj, const bool force=1) throw (NotFound, CannotProceed, InvalidName, AlreadyBound)
void bindRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj) throw (CannotProceed, InvalidName, AlreadyBound)
void rebind (const CosNaming::Name &name, CORBA::Object_ptr obj, const bool force=1) throw (NotFound, CannotProceed, InvalidName)
void rebindByString (const char *string_name, CORBA::Object_ptr obj, const bool force=1) throw (NotFound, CannotProceed, InvalidName)
void rebindRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj) throw (CannotProceed, InvalidName)
void bindContext (const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (NotFound, CannotProceed, InvalidName, AlreadyBound)
void bindContext (const char *string_name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (NotFound, CannotProceed, InvalidName, AlreadyBound)
void bindContextRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt)
void rebindContext (const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (NotFound, CannotProceed, InvalidName)
void rebindContext (const char *string_name, CosNaming::NamingContext_ptr name_cxt, const bool force=1) throw (NotFound, CannotProceed, InvalidName)
void rebindContextRecursive (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt)
CORBA::Object_ptr resolve (const CosNaming::Name &name) throw (NotFound, CannotProceed, InvalidName)
CORBA::Object_ptr resolve (const char *string_name) throw (NotFound, CannotProceed, InvalidName)
void unbind (const CosNaming::Name &name) throw (NotFound, CannotProceed, InvalidName)
void unbind (const char *string_name) throw (NotFound, CannotProceed, InvalidName)
CosNaming::NamingContext_ptr newContext ()
CosNaming::NamingContext_ptr bindNewContext (const CosNaming::Name &name, bool force=true) throw (NotFound, CannotProceed, InvalidName, AlreadyBound)
CosNaming::NamingContext_ptr bindNewContext (const char *string_name, bool force=true) throw (NotFound, CannotProceed, InvalidName, AlreadyBound)
void destroy (CosNaming::NamingContext_ptr context) throw (NotEmpty)
 Destroy the naming context.
void destroyRecursive (CosNaming::NamingContext_ptr context) throw (NotEmpty, NotFound, CannotProceed, InvalidName)
 Destroy the naming context recursively.
void clearAll ()
 Destroy all binding.
void list (CosNaming::NamingContext_ptr name_cxt, unsigned long how_many, CosNaming::BindingList_var &bl, CosNaming::BindingIterator_var &bi)
 Get Binding on the NamingContextDestroy all binding.
char * toString (const CosNaming::Name &name) throw (InvalidName)
 Get string representation of given NameComponent.
CosNaming::Name toName (const char *string_name) throw (InvalidName)
 Get NameComponent from gien string name representation.
char * toUrl (char *addr, char *string_name) throw (InvalidAddress, InvalidName)
 Get URL representation from given addr and string_name.
CORBA::Object_ptr resolveStr (const char *string_name) throw (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 of resolve the given name component.
CosNaming::NamingContext_ptr bindOrResolveContext (CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr new_context)
 Bind of resolve the given name component.
CosNaming::NamingContext_ptr bindOrResolveContext (CosNaming::NamingContext_ptr context, const CosNaming::Name &name)
 Bind of resolve the given name component.
const char * getNameServer ()
 Get the name of naming server.
CosNaming::NamingContext_ptr getRootContext ()
 Get the root context.
bool isNamingContext (CORBA::Object_ptr obj)
 Whether the object is NamingContext.
bool isNamingContext (const CosNaming::Name &name)
 Whether the given name component is NamingContext.
bool isNamingContext (const char *string_name)
 Whether the given string name is NamingContext.
CosNaming::Name subName (const CosNaming::Name &name, long begin, long end=-1)
 Get subset of given name component.

Protected Member Functions

void nameToString (const CosNaming::Name &name, char *string_name, unsigned long 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
std::string m_nameServer
CosNaming::NamingContextExt_var m_rootContext


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.


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
 


Constructor & Destructor Documentation

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

RTC::CorbaNaming::CorbaNaming CORBA::ORB_ptr  orb,
const char *  name_server
 

virtual RTC::CorbaNaming::~CorbaNaming  )  [inline, virtual]
 


Member Function Documentation

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

void RTC::CorbaNaming::bindByString const char *  string_name,
CORBA::Object_ptr  obj,
const bool  force = 1
throw (NotFound, CannotProceed, InvalidName, AlreadyBound)
 

void RTC::CorbaNaming::bindContext const char *  string_name,
CosNaming::NamingContext_ptr  name_cxt,
const bool  force = 1
throw (NotFound, CannotProceed, InvalidName, AlreadyBound)
 

void RTC::CorbaNaming::bindContext const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  name_cxt,
const bool  force = 1
throw (NotFound, CannotProceed, InvalidName, AlreadyBound)
 

void RTC::CorbaNaming::bindContextRecursive CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  name_cxt
 

CosNaming::NamingContext_ptr RTC::CorbaNaming::bindNewContext const char *  string_name,
bool  force = true
throw (NotFound, CannotProceed, InvalidName, AlreadyBound)
 

CosNaming::NamingContext_ptr RTC::CorbaNaming::bindNewContext const CosNaming::Name &  name,
bool  force = true
throw (NotFound, CannotProceed, InvalidName, AlreadyBound)
 

CORBA::Object_ptr RTC::CorbaNaming::bindOrResolve CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CORBA::Object_ptr  obj
 

Bind of resolve the given name component.

CosNaming::NamingContext_ptr RTC::CorbaNaming::bindOrResolveContext CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name
 

Bind of resolve the given name component.

CosNaming::NamingContext_ptr RTC::CorbaNaming::bindOrResolveContext CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  new_context
 

Bind of resolve the given name component.

void RTC::CorbaNaming::bindRecursive CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CORBA::Object_ptr  obj
throw (CannotProceed, InvalidName, AlreadyBound)
 

void RTC::CorbaNaming::clearAll  ) 
 

Destroy all binding.

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

Destroy the naming context.

Delete 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.

void RTC::CorbaNaming::destroyRecursive CosNaming::NamingContext_ptr  context  )  throw (NotEmpty, NotFound, CannotProceed, InvalidName)
 

Destroy the naming context recursively.

CORBA::ULong RTC::CorbaNaming::getNameLength const CosNaming::Name &  name  )  [protected]
 

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

const char* RTC::CorbaNaming::getNameServer  ) 
 

Get the name of naming server.

CosNaming::NamingContext_ptr RTC::CorbaNaming::getRootContext  ) 
 

Get the root context.

void RTC::CorbaNaming::init const char *  name_server  ) 
 

bool RTC::CorbaNaming::isNamingContext const char *  string_name  ) 
 

Whether the given string name is NamingContext.

bool RTC::CorbaNaming::isNamingContext const CosNaming::Name &  name  ) 
 

Whether the given name component is NamingContext.

bool RTC::CorbaNaming::isNamingContext CORBA::Object_ptr  obj  ) 
 

Whether the object is NamingContext.

void RTC::CorbaNaming::list CosNaming::NamingContext_ptr  name_cxt,
unsigned long  how_many,
CosNaming::BindingList_var &  bl,
CosNaming::BindingIterator_var &  bi
 

Get Binding on the NamingContextDestroy all binding.

void RTC::CorbaNaming::nameToString const CosNaming::Name &  name,
char *  string_name,
unsigned long  slen
[protected]
 

Get string representation of name component.

CosNaming::NamingContext_ptr RTC::CorbaNaming::newContext  ) 
 

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

void RTC::CorbaNaming::rebindByString const char *  string_name,
CORBA::Object_ptr  obj,
const bool  force = 1
throw (NotFound, CannotProceed, InvalidName)
 

void RTC::CorbaNaming::rebindContext const char *  string_name,
CosNaming::NamingContext_ptr  name_cxt,
const bool  force = 1
throw (NotFound, CannotProceed, InvalidName)
 

void RTC::CorbaNaming::rebindContext const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  name_cxt,
const bool  force = 1
throw (NotFound, CannotProceed, InvalidName)
 

void RTC::CorbaNaming::rebindContextRecursive CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CosNaming::NamingContext_ptr  name_cxt
 

void RTC::CorbaNaming::rebindRecursive CosNaming::NamingContext_ptr  context,
const CosNaming::Name &  name,
CORBA::Object_ptr  obj
throw (CannotProceed, InvalidName)
 

CORBA::Object_ptr RTC::CorbaNaming::resolve const char *  string_name  )  throw (NotFound, CannotProceed, InvalidName)
 

CORBA::Object_ptr RTC::CorbaNaming::resolve const CosNaming::Name &  name  )  throw (NotFound, CannotProceed, InvalidName)
 

CORBA::Object_ptr RTC::CorbaNaming::resolveStr const char *  string_name  )  throw (NotFound, CannotProceed, InvalidName, AlreadyBound)
 

Resolve from name of string representation and get object.

unsigned int RTC::CorbaNaming::split const std::string &  input,
const std::string &  delimiter,
std::vector< std::string > &  results
[protected]
 

Split of string.

CosNaming::Name RTC::CorbaNaming::subName const CosNaming::Name &  name,
long  begin,
long  end = -1
 

Get subset of given name component.

CosNaming::Name RTC::CorbaNaming::toName const char *  string_name  )  throw (InvalidName)
 

Get NameComponent from gien string name representation.

char* RTC::CorbaNaming::toString const CosNaming::Name &  name  )  throw (InvalidName)
 

Get string representation of given NameComponent.

char* RTC::CorbaNaming::toUrl char *  addr,
char *  string_name
throw (InvalidAddress, InvalidName)
 

Get URL representation from given addr and string_name.

void RTC::CorbaNaming::unbind const char *  string_name  )  throw (NotFound, CannotProceed, InvalidName)
 

void RTC::CorbaNaming::unbind const CosNaming::Name &  name  )  throw (NotFound, CannotProceed, InvalidName)
 


Member Data Documentation

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

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

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


The documentation for this class was generated from the following file:
Generated on Fri Oct 5 05:16:02 2007 for OpenRTM by  doxygen 1.4.1