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);
1141 char*
toString(const CosNaming::Name& name)
1142 throw (SystemException, InvalidName);
1169 CosNaming::Name
toName(const
char* string_name)
1170 throw (SystemException, InvalidName);
1201 char*
toUrl(
char* addr,
char* string_name)
1202 throw (SystemException, InvalidAddress, InvalidName);
1235 CORBA::Object_ptr
resolveStr(const
char* string_name)
1236 throw (SystemException, NotFound, CannotProceed,
1237 InvalidName, AlreadyBound);
1279 CORBA::Object_ptr
bindOrResolve(CosNaming::NamingContext_ptr context,
1280 const CosNaming::Name& name,
1281 CORBA::Object_ptr obj);
1316 CosNaming::NamingContext_ptr
1318 const CosNaming::Name& name,
1319 CosNaming::NamingContext_ptr new_context);
1351 CosNaming::NamingContext_ptr
1353 const CosNaming::Name& name);
1491 CosNaming::Name
subName(const CosNaming::Name& name,
1493 CORBA::Long end = -1);
1528 void nameToString(const CosNaming::Name& name,
char* string_name,
1585 unsigned int split(const
std::
string& input,
1586 const
std::
string& delimiter,
1587 std::vector<
std::
string>& results);
1622 #pragma warning( default : 4290 ) 1625 #endif // end of RTC_CORBANAMING_H bool isNamingContext(CORBA::Object_ptr obj)
Determine whether the object is NamingContext.
CosNaming::NamingContext::CannotProceed CannotProceed
void destroyRecursive(CosNaming::NamingContext_ptr context)
Destroy the naming context recursively.
CORBA::Object_ptr resolveStr(const char *string_name)
Resolve from name of string representation and get object.
void rebindRecursive(CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj)
Bind intermediate context recursively and rebind object.
void nameToString(const CosNaming::Name &name, char *string_name, CORBA::ULong slen)
Get string representation of name component.
CORBA::SystemException SystemException
CosNaming::NamingContext_ptr bindNewContext(const CosNaming::Name &name, bool force=true)
Bind new NamingContext.
CORBA::ORB_var m_varORB
ORB.
const char * getNameServer()
Get the name of name server.
void rebind(const CosNaming::Name &name, CORBA::Object_ptr obj, const bool force=1)
Rebind object.
unsigned int split(const std::string &input, const std::string &delimiter, std::vector< std::string > &results)
Split of string.
CosNaming::NamingContext_ptr getRootContext()
Get the root context.
CORBA::Object_ptr resolve(const CosNaming::Name &name)
Return object bound on the specified NameComponent.
std::string m_nameServer
Name of the name server.
CorbaNaming(CORBA::ORB_ptr orb)
Consructor.
void bindContextRecursive(CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt)
Bind intermediate context recursively and bind NamingContext.
void bindByString(const char *string_name, CORBA::Object_ptr obj, const bool force=1)
Bind object on specified string name position.
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.
CORBA::ULong getNameLength(const CosNaming::Name &name)
Get string length of the name component's string representation.
void unbind(const CosNaming::Name &name)
Unbind a binding specified by NameComponent.
CosNaming::Name subName(const CosNaming::Name &name, CORBA::Long begin, CORBA::Long end=-1)
Get subset of given name component.
CosNaming::NamingContext::NotFound NotFound
void rebindContextRecursive(CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt)
Rebind intermediate context recursively and rebind NamingContext.
void init(const char *name_server)
Initialize the Naming Service.
void bindContext(const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt, const bool force=1)
Bind NamingContext.
CosNaming::NamingContext_ptr newContext()
Create new NamingContext.
void bind(const CosNaming::Name &name, CORBA::Object_ptr obj, const bool force=1)
Bind object on specified name component position.
CosNaming::NamingContextExt_var m_rootContext
The root context of specified name server.
CosNaming::NamingContext::NotEmpty NotEmpty
CosNaming::Name toName(const char *string_name)
Resolve given string representation to NameComponent.
CosNaming::NamingContext::AlreadyBound AlreadyBound
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::NamingContextExt::InvalidAddress InvalidAddress
CosNaming::NamingContext::InvalidName InvalidName
char * toUrl(char *addr, char *string_name)
Get URL representation from given addr and string_name.
void bindRecursive(CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj)
Bind intermediate context recursively and bind object.
CORBA::Object_ptr bindOrResolve(CosNaming::NamingContext_ptr context, const CosNaming::Name &name, CORBA::Object_ptr obj)
Bind or resolve the given name component.
std::vector< CORBA::Object_ptr > ObjectList
virtual ~CorbaNaming(void)
Virtual destructor.
char * toString(const CosNaming::Name &name)
Get string representation of given NameComponent.
void destroy(CosNaming::NamingContext_ptr context)
Destroy the naming context.
void rebindContext(const CosNaming::Name &name, CosNaming::NamingContext_ptr name_cxt, const bool force=1)
Rebind NamingContext.
void clearAll()
Destroy all bindings.
void rebindByString(const char *string_name, CORBA::Object_ptr obj, const bool force=1)
Rebind Object.