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

TAO_Bounded_Base_Sequence Class Reference

Base class for all bounded sequences. More...

#include <Sequence.h>

Inheritance diagram for TAO_Bounded_Base_Sequence:

Inheritance graph
[legend]
Collaboration diagram for TAO_Bounded_Base_Sequence:

Collaboration graph
[legend]
List of all members.

Public Methods

void length (CORBA::ULong length)
 Set the length, for this sequences this call is ignored if the new length is greater that the maximum. More...

CORBA::ULong length (void) const
virtual ~TAO_Bounded_Base_Sequence (void)
 Destructor. More...


Protected Methods

 TAO_Bounded_Base_Sequence (void)
 Default constructor. More...

 TAO_Bounded_Base_Sequence (CORBA::ULong maximum, CORBA::ULong length, void *buffer, CORBA::Boolean release=0)
 Constructor with control of ownership. More...

 TAO_Bounded_Base_Sequence (CORBA::ULong maximum, void *buffer)
 Assume ownership and set length to 0. More...


Detailed Description

Base class for all bounded sequences.

This class implements part of the funcionality common to all bounded sequences, using this intermediate class instead of virtual methods on TAO_Base_Sequence give us a slight improvement of performance, but also reduces the amount of generated code in the templates.

Definition at line 196 of file Sequence.h.


Constructor & Destructor Documentation

TAO_Bounded_Base_Sequence::~TAO_Bounded_Base_Sequence void    [virtual]
 

Destructor.

Definition at line 54 of file Sequence.cpp.

00055 {
00056 }

ACE_INLINE TAO_Bounded_Base_Sequence::TAO_Bounded_Base_Sequence void    [protected]
 

Default constructor.

Definition at line 117 of file Sequence.i.

00118 {
00119 }

ACE_INLINE TAO_Bounded_Base_Sequence::TAO_Bounded_Base_Sequence CORBA::ULong    maximum,
CORBA::ULong    length,
void *    buffer,
CORBA::Boolean    release = 0
[protected]
 

Constructor with control of ownership.

Definition at line 123 of file Sequence.i.

00127   :  TAO_Base_Sequence (maximum, length, buffer, release)
00128 {
00129 }

ACE_INLINE TAO_Bounded_Base_Sequence::TAO_Bounded_Base_Sequence CORBA::ULong    maximum,
void *    buffer
[protected]
 

Assume ownership and set length to 0.

Definition at line 133 of file Sequence.i.

00135   :  TAO_Base_Sequence (maximum, buffer)
00136 {
00137 }


Member Function Documentation

ACE_INLINE CORBA::ULong TAO_Bounded_Base_Sequence::length void    const
 

Return the current length, it cannot go into the base class due to the C++ name lookup rules (if you don't know what I'm talking about, then try moving it there).

Definition at line 140 of file Sequence.i.

References TAO_Base_Sequence::length_.

00141 {
00142   return this->length_;
00143 }

ACE_INLINE void TAO_Bounded_Base_Sequence::length CORBA::ULong    length
 

Set the length, for this sequences this call is ignored if the new length is greater that the maximum.

Definition at line 146 of file Sequence.i.

References TAO_Base_Sequence::_allocate_buffer, TAO_Base_Sequence::_shrink_buffer, TAO_Base_Sequence::buffer_, length, TAO_Base_Sequence::length_, TAO_Base_Sequence::maximum_, and TAO_Base_Sequence::release_.

Referenced by TAO_Bounded_Array_Sequence::_allocate_buffer, TAO_Bounded_Abstract_Sequence::_allocate_buffer, TAO_Bounded_Valuetype_Sequence::_allocate_buffer, TAO_Bounded_Pseudo_Sequence::_allocate_buffer, TAO_Bounded_Object_Sequence::_allocate_buffer, length, TAO_Bounded_Array_Sequence::replace, TAO_Bounded_Sequence::replace, TAO_Bounded_WString_Sequence::replace, and TAO_Bounded_String_Sequence::replace.

00147 {
00148   if (this->buffer_ == 0)
00149     {
00150       this->_allocate_buffer (this->maximum_);
00151       this->release_ = 1;
00152     }
00153 
00154   if (length > this->maximum_)
00155     {
00156       return;
00157     }
00158   else if (length < this->length_)
00159     {
00160       this->_shrink_buffer (length, this->length_);
00161     }
00162 
00163   this->length_ = length;
00164 }


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:04:54 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002