#include <Registry.h>
Public Types | |
| typedef ACE_Unbounded_Set< Name_Component > | Name |
| A Name is an ordered collections of components (ids). | |
| typedef ACE_Unbounded_Set< Binding > | Binding_List |
| A list of bindings. | |
| enum | Binding_Type { INVALID, OBJECT, CONTEXT } |
| There are two types of bindings. More... | |
Static Public Member Functions | |
| ACE_TString | make_string (const Name &name) |
Convert a name to a string. | |
| Name | make_name (const ACE_TString &string) |
Convert a string to a name. | |
Static Public Attributes | |
| const ACE_TCHAR | STRING_SEPARATOR [] = ACE_LIB_TEXT ("\\") |
| Separator for components in a name. | |
The registry interface is inspired by the interface specified in the CORBA Naming Service Specification. The implementation is done through Win32 <Reg*> functions. Other than providing an OO wrapper for the Win32 <Reg*> functions, ACE_Registry provides an abstraction for iteration over the elements of the Registry.
Definition at line 44 of file Registry.h.
|
|
|
|
There are two types of bindings.
Definition at line 74 of file Registry.h.
|
|
|
Convert a string to a
Definition at line 638 of file Registry.cpp. References ACE_TString, ACE_String_Base< CHAR >::find(), ACE_Registry::Name_Component::id_, ACE_Unbounded_Set< T >::insert(), Name, ssize_t, STRING_SEPARATOR, ACE_OS::strlen(), and ACE_String_Base< CHAR >::substr(). Referenced by ACE_Registry::Naming_Context::name(), and ACE_Registry::Binding::name().
00639 {
00640 ssize_t new_position = 0;
00641 ssize_t last_position = 0;
00642 Name name;
00643
00644 // Rememeber: NPOS is -1
00645 while (new_position != ACE_TString::npos)
00646 {
00647 Name_Component component;
00648 // Find the separator
00649 new_position = string.find (STRING_SEPARATOR, new_position);
00650 if (new_position != ACE_TString::npos)
00651 // If we have not gone past the end
00652 {
00653 // Get the substring
00654 component.id_ = string.substr (last_position,
00655 new_position - last_position);
00656 // Skip past the seperator
00657 new_position +=
00658 ACE_OS::strlen (STRING_SEPARATOR);
00659 }
00660 else
00661 {
00662 // Get the last substring
00663 component.id_ = string.substr (last_position);
00664 }
00665 // Update positions
00666 last_position = new_position;
00667 // Insert component into name
00668 name.insert (component);
00669 }
00670
00671 return name;
00672 }
|
|
|
|
Separator for components in a name.
Definition at line 30 of file Registry.cpp. Referenced by make_name(), and make_string(). |
1.3.6