Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Registry::Binding_Iterator Class Reference

An iterator. More...

#include <Registry.h>

Collaboration diagram for ACE_Registry::Binding_Iterator:

Collaboration graph
List of all members.

Public Methods

 Binding_Iterator (void)
 Default constructor. More...

int next_one (Binding &binding)
 Next entry. More...

int next_n (u_long how_many, Binding_List &list)
 Next <how_many> entries. More...

int destroy (void)
 Cleanup. More...

void reset (void)
 Reset the internal state of the iterator. More...

Naming_Contextnaming_context (void)
 Get naming_context that the iterator is iterating over. More...

Private Methods

void naming_context (Naming_Context &naming_context)
 Set naming_context that the iterator is iterating over. More...

void current_enumeration (Iteration_State &current_enumeration)
 Set current_enumeration. More...

Iteration_Statecurrent_enumeration (void)
 Get current_enumeration. More...

Private Attributes

 Reference to context. More...

Object_Iteration object_iteration_
 Instances of all states. More...

Context_Iteration context_iteration_
Iteration_Complete iteration_complete_
 Pointer to current state. More...


class Naming_Context
 Friend factory. More...

class Iteration_State
 Friend states. More...

class Object_Iteration
class Context_Iteration
class Iteration_Complete

Detailed Description

An iterator.

Useful when iteratorating over a few entries at a time

Definition at line 417 of file Registry.h.

Constructor & Destructor Documentation

ACE_Registry::Binding_Iterator::Binding_Iterator void   

Default constructor.

Definition at line 812 of file Registry.cpp.

References reset.

Referenced by ACE_Registry::Binding_Iterator::Context_Iteration::Context_Iteration, ACE_Registry::Binding_Iterator::Iteration_Complete::Iteration_Complete, ACE_Registry::Binding_Iterator::Iteration_State::Iteration_State, and ACE_Registry::Binding_Iterator::Object_Iteration::Object_Iteration.

00813   : object_iteration_ (*this),
00814     context_iteration_ (*this),
00815     iteration_complete_ (*this)
00816 {
00817   this->reset ();
00818 }

Member Function Documentation

ACE_Registry::Binding_Iterator::Iteration_State & ACE_Registry::Binding_Iterator::current_enumeration void    [private]

Get current_enumeration.

Definition at line 928 of file Registry.cpp.

References current_enumeration_.

00929 {
00930   return *this->current_enumeration_;
00931 }

void ACE_Registry::Binding_Iterator::current_enumeration Iteration_State   current_enumeration [private]

Set current_enumeration.

Definition at line 921 of file Registry.cpp.

References current_enumeration, and current_enumeration_.

Referenced by current_enumeration, and ACE_Registry::Naming_Context::list.

00922 {
00923   this->current_enumeration_ = &current_enumeration;
00924 }

int ACE_Registry::Binding_Iterator::destroy void   


Definition at line 897 of file Registry.cpp.

References reset.

00898 {
00899   this->reset ();
00900   return 0;
00901 }

void ACE_Registry::Binding_Iterator::naming_context Naming_Context   naming_context [private]

Set naming_context that the iterator is iterating over.

Definition at line 906 of file Registry.cpp.

References naming_context, and naming_context_.

00907 {
00908   this->naming_context_ = &naming_context;
00909 }

ACE_Registry::Naming_Context & ACE_Registry::Binding_Iterator::naming_context void   

Get naming_context that the iterator is iterating over.

Definition at line 913 of file Registry.cpp.

References naming_context_.

Referenced by ACE_Predefined_Naming_Contexts::connect, ACE_Registry::Naming_Context::list, and naming_context.

00914 {
00915   return *this->naming_context_;
00916 }

int ACE_Registry::Binding_Iterator::next_n u_long    how_many,
Binding_List   list

Next <how_many> entries.

Definition at line 883 of file Registry.cpp.

References ACE_Registry::Binding_List, current_enumeration_, and ACE_Registry::Binding_Iterator::Iteration_State::next_n.

Referenced by next_one.

00885 {
00886   // Empty list
00887   static const ACE_Registry::Binding_List empty_list;
00888   // Make sure that the list is empty
00889   list = empty_list;
00891   return this->current_enumeration_->next_n (how_many, list);
00892 }

int ACE_Registry::Binding_Iterator::next_one Binding   binding

Next entry.

Definition at line 865 of file Registry.cpp.

References ACE_Unbounded_Set::begin, and next_n.

Referenced by ACE_Registry::Naming_Context::list.

00866 {
00867   u_long how_many = 1;
00868   Binding_List list;
00870   // Get next n (where n is one)
00871   long result = this->next_n (how_many, list);
00873   if (result == 0)
00874     // Success
00875     binding = (*list.begin ());
00877   return result;
00878 }

void ACE_Registry::Binding_Iterator::reset void   

Reset the internal state of the iterator.

Definition at line 822 of file Registry.cpp.

References context_iteration_, current_enumeration_, iteration_complete_, object_iteration_, and ACE_Registry::Binding_Iterator::Iteration_State::reset.

Referenced by Binding_Iterator, and destroy.

00823 {
00824   this->current_enumeration_ = &this->iteration_complete_;
00825   this->iteration_complete_.reset ();
00826   this->object_iteration_.reset ();
00827   this->context_iteration_.reset ();
00828 }

Friends And Related Function Documentation

friend class Context_Iteration [friend]

Definition at line 513 of file Registry.h.

friend class Iteration_Complete [friend]

Definition at line 514 of file Registry.h.

friend class Iteration_State [friend]

Friend states.

Definition at line 511 of file Registry.h.

Referenced by ACE_Registry::Binding_Iterator::Context_Iteration::Context_Iteration, ACE_Registry::Binding_Iterator::Iteration_Complete::Iteration_Complete, and ACE_Registry::Binding_Iterator::Object_Iteration::Object_Iteration.

friend class Naming_Context [friend]

Friend factory.

Definition at line 421 of file Registry.h.

friend class Object_Iteration [friend]

Definition at line 512 of file Registry.h.

Member Data Documentation

Context_Iteration ACE_Registry::Binding_Iterator::context_iteration_ [private]

Definition at line 518 of file Registry.h.

Referenced by reset.

Iteration_State* ACE_Registry::Binding_Iterator::current_enumeration_ [private]

Pointer to current state.

Definition at line 522 of file Registry.h.

Referenced by current_enumeration, next_n, and reset.

Iteration_Complete ACE_Registry::Binding_Iterator::iteration_complete_ [private]

Definition at line 519 of file Registry.h.

Referenced by reset.

Naming_Context* ACE_Registry::Binding_Iterator::naming_context_ [private]

Reference to context.

Definition at line 448 of file Registry.h.

Referenced by naming_context.

Object_Iteration ACE_Registry::Binding_Iterator::object_iteration_ [private]

Instances of all states.

Definition at line 517 of file Registry.h.

Referenced by ACE_Registry::Naming_Context::list, and reset.

The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:55:08 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002