Public Member Functions | Protected Attributes

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 397 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 1085 of file Object_Adapter.cpp.

  : size_ (size),
    folded_buffer_ (folded_buffer),
    last_separator_ ((CORBA::ULong) ~0)
{
  if (begin)
    {
      this->position_ = (CORBA::ULong) ~0;
      this->operator++ ();
    }
  else
    this->position_ = this->size_;
}


Member Function Documentation

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

Definition at line 1109 of file Object_Adapter.cpp.

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

ACE_CString TAO_Object_Adapter::poa_name_iterator::operator* ( void   )  const

Dereference operator.

Definition at line 1115 of file Object_Adapter.cpp.

{
  CORBA::ULong start_at =
    this->last_separator_ +
    TAO_Root_POA::name_separator_length ();

  CORBA::ULong how_many =
    this->position_
    - this->last_separator_
    - TAO_Root_POA::name_separator_length ();

  return ACE_CString (reinterpret_cast <const char *>
                                       (&this->folded_buffer_[start_at]),
                      how_many);
}

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

Prefix advance.

Definition at line 1132 of file Object_Adapter.cpp.

{
  for (this->last_separator_ = this->position_;
       ;
       )
    {
      ++this->position_;
      if (this->position_ < this->size_)
        {
          if (this->folded_buffer_[this->position_] == TAO_Root_POA::name_separator ())
            break;
        }
      else
        break;
    }

  return *this;
}

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

Comparison operators.

Definition at line 1103 of file Object_Adapter.cpp.

{
  return this->position_ == rhs.position_;
}


Member Data Documentation

Definition at line 420 of file Object_Adapter.h.

Definition at line 421 of file Object_Adapter.h.

Definition at line 419 of file Object_Adapter.h.

Definition at line 418 of file Object_Adapter.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines