20 #ifndef RTC_CORBANAMING_H    21 #define RTC_CORBANAMING_H    46 #pragma warning( disable : 4290 )   126     CorbaNaming(CORBA::ORB_ptr orb, 
const char* name_server);
   160     void init(
const char* name_server);
   165     typedef CosNaming::NamingContext::NotFound      
NotFound;
   169     typedef CosNaming::NamingContext::NotEmpty      
NotEmpty;
   255     void bind(
const CosNaming::Name& name, CORBA::Object_ptr obj,
   256           const bool force = 1)
   257       throw (SystemException, NotFound, CannotProceed,
   258              InvalidName, AlreadyBound);
   298     void bindByString(const 
char* string_name, CORBA::Object_ptr obj,
   299               const 
bool force = 1)
   300       throw (SystemException, NotFound, CannotProceed,
   301              InvalidName, AlreadyBound);
   364                const CosNaming::Name& name,
   365                CORBA::Object_ptr obj)
   366       throw (SystemException, CannotProceed, InvalidName, AlreadyBound);
   405     void rebind(const CosNaming::Name& name, CORBA::Object_ptr obj,
   406         const 
bool force = 1)
   407       throw (SystemException, NotFound, CannotProceed, InvalidName);
   445     void rebindByString(const 
char* string_name, CORBA::Object_ptr obj,
   446             const 
bool force = 1)
   447       throw (SystemException, NotFound, CannotProceed, InvalidName);
   487              const CosNaming::Name& name,
   488              CORBA::Object_ptr obj)
   489       throw (SystemException, CannotProceed, InvalidName);
   528              CosNaming::NamingContext_ptr name_cxt,
   529              const 
bool force = 1)
   530       throw (SystemException, NotFound, CannotProceed,
   531              InvalidName, AlreadyBound);
   571              CosNaming::NamingContext_ptr name_cxt,
   572              const 
bool force = 1)
   573       throw (SystemException, NotFound, CannotProceed,
   574              InvalidName, AlreadyBound);
   602                   const CosNaming::Name& name,
   603                   CosNaming::NamingContext_ptr name_cxt);
   644                CosNaming::NamingContext_ptr name_cxt,
   645                const 
bool force = 1)
   646       throw (SystemException, NotFound, CannotProceed, InvalidName);
   687                CosNaming::NamingContext_ptr name_cxt,
   688                const 
bool force = 1)
   689       throw (SystemException, NotFound, CannotProceed, InvalidName);
   717                 const CosNaming::Name& name,
   718                 CosNaming::NamingContext_ptr name_cxt);
   761     CORBA::Object_ptr 
resolve(const CosNaming::Name& name)
   762       throw (SystemException, NotFound, CannotProceed, InvalidName);
   806     CORBA::Object_ptr 
resolve(const 
char* string_name)
   807       throw (SystemException, NotFound, CannotProceed, InvalidName);
   846     void unbind(const CosNaming::Name& name)
   847       throw (SystemException, NotFound, CannotProceed, InvalidName);
   891     void unbind(const 
char* string_name)
   892       throw (SystemException, NotFound, CannotProceed, InvalidName);
   956     CosNaming::NamingContext_ptr
   958       throw (SystemException, NotFound, CannotProceed,
   959              InvalidName, AlreadyBound);
  1001     CosNaming::NamingContext_ptr
  1003       throw (SystemException, NotFound, CannotProceed,
  1004              InvalidName, AlreadyBound);
  1033     void destroy(CosNaming::NamingContext_ptr context)
  1034       throw (SystemException, NotEmpty);
  1068       throw (SystemException, NotEmpty, NotFound, CannotProceed, InvalidName);
  1108     void list(CosNaming::NamingContext_ptr name_cxt,
  1109               CORBA::ULong how_many,
  1110               CosNaming::BindingList_var& bl,
  1111               CosNaming::BindingIterator_var& bi);
  1148     void list(const 
char* string_name,
  1149               CosNaming::BindingList_var& bl);
  1198                     const 
char* string_kind,
  1199                     CosNaming::BindingList_var& bl);
  1229     char* 
toString(const CosNaming::Name& name)
  1230       throw (SystemException, InvalidName);
  1257     CosNaming::Name 
toName(const 
char* string_name)
  1258       throw (SystemException, InvalidName);
  1289     char* 
toUrl(
char* addr, 
char* string_name)
  1290       throw (SystemException, InvalidAddress, InvalidName);
  1323     CORBA::Object_ptr 
resolveStr(const 
char* string_name)
  1324       throw (SystemException, NotFound, CannotProceed,
  1325              InvalidName, AlreadyBound);
  1367     CORBA::Object_ptr 
bindOrResolve(CosNaming::NamingContext_ptr context,
  1368                     const CosNaming::Name& name,
  1369                     CORBA::Object_ptr obj);
  1404     CosNaming::NamingContext_ptr
  1406              const CosNaming::Name& name,
  1407              CosNaming::NamingContext_ptr new_context);
  1439     CosNaming::NamingContext_ptr
  1441              const CosNaming::Name& name);
  1579     CosNaming::Name 
subName(const CosNaming::Name& name,
  1581                 CORBA::Long end = -1);
  1616     void nameToString(const CosNaming::Name& name, 
char* string_name,
  1673     unsigned int split(const std::
string& input,
  1674                const std::
string& delimiter,
  1675                std::vector<std::
string>& results);
  1704     CORBA::ULong m_blLength;
  1710 #pragma warning( default : 4290 )  1713 #endif // end of RTC_CORBANAMING_H CosNaming::NamingContext_ptr newContext()
Create new NamingContext. 
 
CosNaming::Name subName(const CosNaming::Name &name, CORBA::Long begin, CORBA::Long end=-1)
Get subset of given name component. 
 
CORBA::ORB_ptr m_ptrORB
ORB. 
Definition: CorbaNaming.h:1684
 
CosNaming::NamingContext_ptr bindNewContext(const CosNaming::Name &name, bool force=true)
Bind new NamingContext. 
 
CosNaming::NamingContext::CannotProceed CannotProceed
Definition: CorbaNaming.h:166
 
void rebindRecursive(CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj)
Bind intermediate context recursively and rebind object. 
 
char * toString(const CosNaming::Name &name)
Get string representation of given NameComponent. 
 
CosNaming::Name toName(const char *string_name)
Resolve given string representation to NameComponent. 
 
void unbind(const CosNaming::Name &name)
Unbind a binding specified by NameComponent. 
 
CORBA::SystemException SystemException
Definition: CorbaNaming.h:164
 
void bind(const CosNaming::Name &name, CORBA::Object_ptr obj, const bool force=1)
Bind object on specified name component position. 
 
void bindByString(const char *string_name, CORBA::Object_ptr obj, const bool force=1)
Bind object on specified string name position. 
 
void bindContextRecursive(CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt)
Bind intermediate context recursively and bind NamingContext. 
 
CORBA::ULong getNameLength(const CosNaming::Name &name)
Get string length of the name component's string representation. 
 
CORBA::Object_ptr resolveStr(const char *string_name)
Resolve from name of string representation and get object. 
 
std::string m_nameServer
Name of the name server. 
Definition: CorbaNaming.h:1693
 
void rebindContext(const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt, const bool force=1)
Rebind NamingContext. 
 
unsigned int split(const std::string &input, const std::string &delimiter, std::vector< std::string > &results)
Split of string. 
 
void init(const char *name_server)
Initialize the Naming Service. 
 
CORBA::Object_ptr bindOrResolve(CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj)
Bind or resolve the given name component. 
 
CORBA::Object_ptr resolve(const CosNaming::Name &name)
Return object bound on the specified NameComponent. 
 
CosNaming::NamingContext_ptr bindOrResolveContext(CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr new_context)
Bind or resolve the given name component. 
 
void rebindByString(const char *string_name, CORBA::Object_ptr obj, const bool force=1)
Rebind Object. 
 
CORBA Naming Service helper class. 
Definition: CorbaNaming.h:89
 
bool isNamingContext(CORBA::Object_ptr obj)
Determine whether the object is NamingContext. 
 
CosNaming::NamingContext::NotFound NotFound
Definition: CorbaNaming.h:165
 
CosNaming::NamingContextExt_var m_rootContext
The root context of specified name server. 
Definition: CorbaNaming.h:1701
 
CosNaming::NamingContext::NotEmpty NotEmpty
Definition: CorbaNaming.h:169
 
CosNaming::NamingContext::AlreadyBound AlreadyBound
Definition: CorbaNaming.h:168
 
CosNaming::NamingContextExt::InvalidAddress InvalidAddress
Definition: CorbaNaming.h:170
 
CosNaming::NamingContext_ptr getRootContext()
Get the root context. 
 
CosNaming::NamingContext::InvalidName InvalidName
Definition: CorbaNaming.h:167
 
void clearAll()
Destroy all bindings. 
 
void nameToString(const CosNaming::Name &name, char *string_name, CORBA::ULong slen)
Get string representation of name component. 
 
std::vector< CORBA::Object_ptr > ObjectList
Definition: CorbaNaming.h:171
 
void destroyRecursive(CosNaming::NamingContext_ptr context)
Destroy the naming context recursively. 
 
void rebindContextRecursive(CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt)
Rebind intermediate context recursively and rebind NamingContext. 
 
void rebind(const CosNaming::Name &name, CORBA::Object_ptr obj, const bool force=1)
Rebind object. 
 
void bindRecursive(CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj)
Bind intermediate context recursively and bind object. 
 
virtual ~CorbaNaming(void)
Virtual destructor. 
Definition: CorbaNaming.h:139
 
void listByKind(const char *string_name, const char *string_kind, CosNaming::BindingList_var &bl)
Get all the binding with specified kind under given naming path. 
 
CorbaNaming(CORBA::ORB_ptr orb)
Consructor. 
 
const char * getNameServer()
Get the name of name server. 
 
char * toUrl(char *addr, char *string_name)
Get URL representation from given addr and string_name. 
 
void destroy(CosNaming::NamingContext_ptr context)
Destroy the naming context. 
 
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. 
 
void bindContext(const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt, const bool force=1)
Bind NamingContext.