TAO_Object_Adapter::poa_name_iterator Class Reference

Iterator for a folded poa name. More...

#include <Object_Adapter.h>

List of all members.

Public Member Functions

 poa_name_iterator (int begin, CORBA::ULong size, const CORBA::Octet *folded_buffer)
 Constructor.

bool operator== (const poa_name_iterator &rhs) const
 Comparison operators.

bool operator!= (const poa_name_iterator &rhs) const
ACE_CString operator * () const
 Dereference operator.

poa_name_iteratoroperator++ (void)
 Prefix advance.


Protected Attributes

CORBA::ULong size_
CORBA::ULong position_
const CORBA::Octetfolded_buffer_
CORBA::ULong last_separator_


Detailed Description

Iterator for a folded poa name.

Definition at line 417 of file Object_Adapter.h.


Constructor & Destructor Documentation

TAO_Object_Adapter::poa_name_iterator::poa_name_iterator int  begin,
CORBA::ULong  size,
const CORBA::Octet folded_buffer
 

Constructor.

Definition at line 1083 of file Object_Adapter.cpp.

References operator++().

01087   : size_ (size),
01088     folded_buffer_ (folded_buffer),
01089     last_separator_ ((CORBA::ULong) ~0)
01090 {
01091   if (begin)
01092     {
01093       this->position_ = (CORBA::ULong) ~0;
01094       this->operator++ ();
01095     }
01096   else
01097     this->position_ = this->size_;
01098 }


Member Function Documentation

ACE_CString TAO_Object_Adapter::poa_name_iterator::operator *  )  const
 

Dereference operator.

Definition at line 1113 of file Object_Adapter.cpp.

References ACE_CString, last_separator_, and TAO_Root_POA::name_separator_length().

01114 {
01115   CORBA::ULong start_at =
01116     this->last_separator_ +
01117     TAO_Root_POA::name_separator_length ();
01118 
01119   CORBA::ULong how_many =
01120     this->position_
01121     - this->last_separator_
01122     - TAO_Root_POA::name_separator_length ();
01123 
01124   return ACE_CString (reinterpret_cast <const char *>
01125                                        (&this->folded_buffer_[start_at]),
01126                       how_many);
01127 }

bool TAO_Object_Adapter::poa_name_iterator::operator!= const poa_name_iterator rhs  )  const
 

Definition at line 1107 of file Object_Adapter.cpp.

References operator==().

01108 {
01109   return !this->operator== (rhs);
01110 }

TAO_Object_Adapter::poa_name_iterator & TAO_Object_Adapter::poa_name_iterator::operator++ void   ) 
 

Prefix advance.

Definition at line 1130 of file Object_Adapter.cpp.

References folded_buffer_, last_separator_, and TAO_Root_POA::name_separator().

Referenced by poa_name_iterator().

01131 {
01132   for (this->last_separator_ = this->position_;
01133        ;
01134        )
01135     {
01136       ++this->position_;
01137       if (this->position_ < this->size_)
01138         {
01139           if (this->folded_buffer_[this->position_] == TAO_Root_POA::name_separator ())
01140             break;
01141         }
01142       else
01143         break;
01144     }
01145 
01146   return *this;
01147 }

bool TAO_Object_Adapter::poa_name_iterator::operator== const poa_name_iterator rhs  )  const
 

Comparison operators.

Definition at line 1101 of file Object_Adapter.cpp.

References position_.

Referenced by operator!=().

01102 {
01103   return this->position_ == rhs.position_;
01104 }


Member Data Documentation

const CORBA::Octet* TAO_Object_Adapter::poa_name_iterator::folded_buffer_ [protected]
 

Definition at line 440 of file Object_Adapter.h.

Referenced by operator++().

CORBA::ULong TAO_Object_Adapter::poa_name_iterator::last_separator_ [protected]
 

Definition at line 441 of file Object_Adapter.h.

Referenced by operator *(), and operator++().

CORBA::ULong TAO_Object_Adapter::poa_name_iterator::position_ [protected]
 

Definition at line 439 of file Object_Adapter.h.

Referenced by operator==().

CORBA::ULong TAO_Object_Adapter::poa_name_iterator::size_ [protected]
 

Definition at line 438 of file Object_Adapter.h.


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 13:27:26 2008 for TAO_PortableServer by doxygen 1.3.6