#include <Registry.h>
Public Types | |
| typedef ACE_Unbounded_Set< Name_Component > | Name |
| A Name is an ordered collections of components (ids). More... | |
| typedef ACE_Unbounded_Set< Binding > | Binding_List |
| enum | Binding_Type { INVALID, OBJECT, CONTEXT } |
| There are two types of bindings. More... | |
Static Public Methods | |
| ACE_TString | make_string (const Name &name) |
| Convert a <name> to a <string>. More... | |
| Name | make_name (const ACE_TString &string) |
| Convert a <string> to a <name>. More... | |
Static Public Attributes | |
| const ACE_TCHAR * | STRING_SEPARATOR = ACE_LIB_TEXT ("\\") |
| Separator for components in a name. More... | |
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 42 of file Registry.h.
|
|
Definition at line 115 of file Registry.h. Referenced by ACE_Registry::Naming_Context::list, ACE_Registry_Name_Space::list_name_entries, and ACE_Registry::Binding_Iterator::next_n. |
|
|
A Name is an ordered collections of components (ids).
Definition at line 60 of file Registry.h. |
|
|
There are two types of bindings.
Definition at line 72 of file Registry.h. Referenced by ACE_Registry::Binding::Binding.
|
|
|
Convert a <string> to a <name>.
Definition at line 634 of file Registry.cpp. References ACE_String_Base< char >::find, ACE_Unbounded_Set::insert, ssize_t, STRING_SEPARATOR, ACE_OS_String::strlen, and ACE_String_Base< char >::substr. Referenced by ACE_Registry::Naming_Context::name, and ACE_Registry::Binding::name.
00635 {
00636 ssize_t new_position = 0;
00637 ssize_t last_position = 0;
00638 Name name;
00639
00640 // Rememeber: NPOS is -1
00641 while (new_position != ACE_TString::npos)
00642 {
00643 Name_Component component;
00644 // Find the separator
00645 new_position = string.find (ACE_Registry::STRING_SEPARATOR, new_position);
00646 if (new_position != ACE_TString::npos)
00647 // If we have not gone past the end
00648 {
00649 // Get the substring
00650 component.id_ = string.substr (last_position,
00651 new_position - last_position);
00652 // Skip past the seperator
00653 new_position +=
00654 ACE_OS_String::strlen (ACE_Registry::STRING_SEPARATOR);
00655 }
00656 else
00657 {
00658 // Get the last substring
00659 component.id_ = string.substr (last_position);
00660 }
00661 // Update positions
00662 last_position = new_position;
00663 // Insert component into name
00664 name.insert (component);
00665 }
00666
00667 return name;
00668 }
|
|
|
Convert a <name> to a <string>.
Definition at line 610 of file Registry.cpp. References ACE_Unbounded_Set::begin, ACE_Unbounded_Set::end, and STRING_SEPARATOR. Referenced by ACE_Registry::Naming_Context::bind, ACE_Registry::Naming_Context::bind_context, ACE_Registry::Naming_Context::bind_new, ACE_Registry::Naming_Context::bind_new_context, ACE_Registry::Binding::Binding, ACE_Registry::Naming_Context::name, ACE_Registry::Naming_Context::rebind, ACE_Registry::Naming_Context::rebind_context, ACE_Registry::Naming_Context::resolve, ACE_Registry::Naming_Context::resolve_context, ACE_Registry::Naming_Context::unbind, and ACE_Registry::Naming_Context::unbind_context.
00611 {
00612 ACE_TString string;
00613 Name &name = ACE_const_cast (Name &, const_name);
00614
00615 // Iterator through the components of name
00616 for (Name::iterator iterator = name.begin ();
00617 iterator != name.end ();
00618 iterator++)
00619 {
00620 if (iterator != name.begin ())
00621 // If this is not the first component, we will add separators
00622 string += ACE_Registry::STRING_SEPARATOR;
00623 const Name_Component &component = *iterator;
00624 // Add to string
00625 string += component.id_;
00626 }
00627
00628 return string;
00629 }
|
|
|
Separator for components in a name.
Definition at line 26 of file Registry.cpp. Referenced by make_name, make_string, and ACE_Registry_Name_Space::open. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002