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

TAO_Unbounded_Base_Sequence Class Reference

Base class for all bounded sequences. More...

#include <Sequence.h>

Inheritance diagram for TAO_Unbounded_Base_Sequence:

Inheritance graph
[legend]
Collaboration diagram for TAO_Unbounded_Base_Sequence:

Collaboration graph
[legend]
List of all members.

Public Methods

void length (CORBA::ULong length)
CORBA::ULong length (void) const
virtual ~TAO_Unbounded_Base_Sequence (void)
 destructor. More...


Protected Methods

 TAO_Unbounded_Base_Sequence (void)
 Default constructor. More...

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

 TAO_Unbounded_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 144 of file Sequence.h.


Constructor & Destructor Documentation

TAO_Unbounded_Base_Sequence::~TAO_Unbounded_Base_Sequence void    [virtual]
 

destructor.

Definition at line 46 of file Sequence.cpp.

00047 {
00048 }

ACE_INLINE TAO_Unbounded_Base_Sequence::TAO_Unbounded_Base_Sequence void    [protected]
 

Default constructor.

Definition at line 70 of file Sequence.i.

00071 {
00072 }

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

Constructor with control of ownership.

Definition at line 76 of file Sequence.i.

00080   :  TAO_Base_Sequence (maximum, length, buffer, release)
00081 {
00082 }

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

Assume ownership and set length to 0.

Definition at line 86 of file Sequence.i.

00088   :  TAO_Base_Sequence (maximum, buffer)
00089 {
00090 }


Member Function Documentation

ACE_INLINE CORBA::ULong TAO_Unbounded_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 93 of file Sequence.i.

References TAO_Base_Sequence::length_.

00094 {
00095   return this->length_;
00096 }

ACE_INLINE void TAO_Unbounded_Base_Sequence::length CORBA::ULong    length
 

= SPEC {16.11.2} For an unbounded sequence, setting the length to a larger value than the current length may reallocate the sequence data. Reallocation is conceptually equivalent to creating a new sequence of the desired new length, copying the old sequence elements zero through length into the new sequence, and then assigning the old sequence to be the same as the new sequence.

Definition at line 99 of file Sequence.i.

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

Referenced by TAO_Unbounded_Array_Sequence::_allocate_buffer, TAO_Unbounded_Abstract_Sequence::_allocate_buffer, TAO_Unbounded_Valuetype_Sequence::_allocate_buffer, TAO_Unbounded_Pseudo_Sequence::_allocate_buffer, TAO_Unbounded_Object_Sequence::_allocate_buffer, TAO_Unbounded_Sequence::_allocate_buffer, TAO_Unbounded_WString_Sequence::_allocate_buffer, TAO_Unbounded_String_Sequence::_allocate_buffer, CORBA::InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::_allocate_buffer, CORBA::_TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::_allocate_buffer, CORBA::_TAO_Unbounded_Object_Sequence_CORBA_PolicyList::_allocate_buffer, PortableInterceptor::_TAO_Unbounded_Valuetype_Sequence_PortableInterceptor_ObjectReferenceTemplateSeq::_allocate_buffer, Messaging::_TAO_Unbounded_Sequence_Messaging_PolicyValueSeq::_allocate_buffer, IOP::_TAO_Unbounded_Sequence_IOP_ServiceContextList::_allocate_buffer, IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::_allocate_buffer, IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentList::_allocate_buffer, IOP::_TAO_Unbounded_Sequence_IOP_MultipleComponentProfile::_allocate_buffer, IIOP::_TAO_Unbounded_Sequence_IIOP_ListenPointList::_allocate_buffer, _TAO_Unbounded_Sequence_TAO_IIOPEndpointSequence::_allocate_buffer, Dynamic::_TAO_Unbounded_Object_Sequence_Dynamic_ExceptionList::_allocate_buffer, Dynamic::_TAO_Unbounded_Sequence_Dynamic_ParameterList::_allocate_buffer, CORBA::_TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::_allocate_buffer, CONV_FRAME::CodeSetComponent::_TAO_Unbounded_Sequence_CONV_FRAME_CodeSetComponent__tao_seq_CodeSetId::_allocate_buffer, TAO_Tagged_Components::add_component_i, TAO_Service_Context::add_context_i, TAO_Policy_Set::cleanup_i, TAO_Policy_Set::copy_from, TAO_Tagged_Components::decode, TAO_ObjectKey::decode_string_to_sequence, TAO_Synch_Reply_Dispatcher::dispatch_reply, TAO_ObjectKey::encode_sequence_to_string, TAO_Tagged_Components::get_component, TAO_Service_Context::get_context, TAO_ClientRequestInfo_i::get_effective_component, TAO_ClientRequestInfo_i::get_effective_components, TAO_IIOP_Transport::get_listen_point, TAO_Policy_Set::get_policy_overrides, TAO_Unknown_Profile::hash, TAO_IIOP_Profile::hash, TAO_Service_Context::is_service_id, length, TAO_Policy_Set::num_policies, TAO_Tagged_Profile::object_key, operator<<, operator==, operator>>, TAO_Profile::policies, TAO_IIOP_Connection_Handler::process_listen_point_list, CORBA_ServiceInformation::_TAO_Unbounded_Sequence_CORBA_ServiceInformation__tao_seq_ServiceDetail::replace, CORBA_ServiceInformation::_TAO_Unbounded_Sequence_CORBA_ServiceInformation__tao_seq_ServiceOption::replace, TAO_Unbounded_Array_Sequence::replace, TAO_Unbounded_Sequence::replace, TAO_Unbounded_WString_Sequence::replace, TAO_Unbounded_String_Sequence::replace, CORBA::InvalidPolicies::_TAO_Unbounded_Sequence_CORBA_InvalidPolicies__tao_seq_UShort::replace, CORBA::_TAO_Unbounded_Sequence_CORBA_PolicyTypeSeq::replace, _TAO_Unbounded_Sequence_TAO_IIOPEndpointSequence::replace, CONV_FRAME::CodeSetComponent::_TAO_Unbounded_Sequence_CONV_FRAME_CodeSetComponent__tao_seq_CodeSetId::replace, TAO_ServerRequest::send_no_exception_reply, TAO_Tagged_Components::set_component_i, TAO_Service_Context::set_context, TAO_Service_Context::set_context_i, TAO_Policy_Set::set_policy, TAO_Policy_Set::set_policy_overrides, TAO_Policy_Set::TAO_Policy_Set, TAO_ServerRequest::tao_send_reply_exception, TAO_GIOP_Message_Generator_Parser_12::write_reply_header, TAO_GIOP_Message_Generator_Parser_10::write_reply_header, and TAO_MProfile::~TAO_MProfile.

00100 {
00101   if (length > this->maximum_)
00102     {
00103       this->_allocate_buffer (length);
00104       this->maximum_ = length;
00105       this->release_ = 1;
00106     }
00107   else if (length < this->length_)
00108     {
00109       this->_shrink_buffer (length, this->length_);
00110     }
00111   this->length_ = length;
00112 }


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