diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-09 21:39:39 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-09 21:39:39 +0000 |
commit | 97186e5b9835abdca969c085df9edeb90b23f15a (patch) | |
tree | ab1889fa3c28434f54a83926f5b520054687597b /ace/Registry.cpp | |
parent | 61e045eadb352a7a1dc0b4859ae0e6ff0c50c981 (diff) | |
download | ATCD-97186e5b9835abdca969c085df9edeb90b23f15a.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/Registry.cpp')
-rw-r--r-- | ace/Registry.cpp | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/ace/Registry.cpp b/ace/Registry.cpp index 6b8519699a2..637231bc06b 100644 --- a/ace/Registry.cpp +++ b/ace/Registry.cpp @@ -24,6 +24,14 @@ /* static */ LPCTSTR ACE_Registry::STRING_SEPARATOR = __TEXT ("\\"); +int +ACE_Registry::Name_Component::operator== (const Name_Component &rhs) +{ + return + rhs.id_ == this->id_ && + rhs.kind_ == this->kind_; +} + // Simple binding constructor ACE_Registry::Binding::Binding () : name_ (), @@ -52,6 +60,14 @@ ACE_Registry::Binding::Binding (const Istring &name, } +int +ACE_Registry::Binding::operator== (const Binding &rhs) +{ + return + rhs.name_ == this->name_ && + rhs.type_ == this->type_; +} + // Name accessor // (Name version) void @@ -578,12 +594,13 @@ ACE_Registry::Naming_Context::close (void) // Convert a <name> to a <string> ACE_Registry::Istring -ACE_Registry::make_string (const Name &name) +ACE_Registry::make_string (const Name &const_name) { Istring string; + Name &name = ACE_const_cast (Name &, const_name); // Iterator through the components of name - for (Name::const_iterator iterator = name.begin (); + for (Name::iterator iterator = name.begin (); iterator != name.end (); iterator++) { @@ -603,8 +620,8 @@ ACE_Registry::make_string (const Name &name) ACE_Registry::Name ACE_Registry::make_name (const Istring &string) { - size_t new_position = 0; - size_t last_position = 0; + int new_position = 0; + int last_position = 0; Name name; // Rememeber: NPOS is -1 @@ -630,7 +647,7 @@ ACE_Registry::make_name (const Istring &string) // Update positions last_position = new_position; // Insert component into name - name.push_back (component); + name.insert (component); } return name; @@ -769,7 +786,7 @@ ACE_Registry::Naming_Context::list (Binding_List &list) ACE_Registry::Binding binding; result = iterator.next_one (binding); if (result == 0) - list.push_back (binding); + list.insert (binding); else break; } @@ -841,7 +858,7 @@ ACE_Registry::Binding_Iterator::next_one (Binding &binding) if (result == 0) // Success - binding = list[0]; + binding = (*list.begin ()); return result; } @@ -933,7 +950,7 @@ ACE_Registry::Binding_Iterator::Object_Iteration::next_n (u_long how_many, // Create binding Binding binding (string, OBJECT); // Add to binding list - list.push_back (binding); + list.insert (binding); } // Continue to add to list break; @@ -1003,7 +1020,7 @@ ACE_Registry::Binding_Iterator::Context_Iteration::next_n (u_long how_many, // Create binding Binding binding (string, CONTEXT); // Add to binding list - list.push_back (binding); + list.insert (binding); } // Continue to add to list break; |