#include <Sequence.h>
Inheritance diagram for TAO_Base_Sequence:
Public Member Functions | |
virtual | ~TAO_Base_Sequence (void) |
Destructor. | |
CORBA::ULong | maximum (void) const |
Return the maximum length of the sequence. | |
virtual void | _allocate_buffer (CORBA::ULong length)=0 |
virtual void | _deallocate_buffer (void)=0 |
Must deallocate the buffer and then set it to zero. | |
virtual void | _shrink_buffer (CORBA::ULong new_length, CORBA::ULong old_length) |
virtual void | _downcast (void *target, CORBA::Object *src) |
virtual CORBA::Object * | _upcast (void *src) const |
CORBA::Boolean | release (void) const |
Returns the state of the sequence release flag. | |
TAO_Base_Sequence (const TAO_Base_Sequence &rhs) | |
TAO_Base_Sequence & | operator= (const TAO_Base_Sequence &rhs) |
Protected Member Functions | |
TAO_Base_Sequence (void) | |
Default constructor. | |
TAO_Base_Sequence (CORBA::ULong maximum, CORBA::ULong length, void *buffer, CORBA::Boolean release=0) | |
Constructor with control of ownership. | |
TAO_Base_Sequence (CORBA::ULong maximum, void *buffer) | |
Assume ownership and set length to 0. | |
void | check_bounds (char const *filename, unsigned long lineno, CORBA::ULong tao_idx, CORBA::ULong tao_max) const |
Protected Attributes | |
CORBA::ULong | maximum_ |
The maximum number of elements the buffer can contain. | |
CORBA::ULong | length_ |
The current number of elements in the buffer. | |
void * | buffer_ |
CORBA::Boolean | release_ |
Friends | |
class | TAO_Marshal_Sequence |
This class provides a common interface for all IDL sequences, hence the interpreted marshal engine can manipulate them in a type safe manner.
TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Base_Sequence::~TAO_Base_Sequence | ( | void | ) | [virtual] |
Destructor.
TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE TAO_Base_Sequence::TAO_Base_Sequence | ( | void | ) | [protected] |
Default constructor.
ACE_INLINE TAO_Base_Sequence::TAO_Base_Sequence | ( | CORBA::ULong | maximum, | |
CORBA::ULong | length, | |||
void * | buffer, | |||
CORBA::Boolean | release = 0 | |||
) | [protected] |
Constructor with control of ownership.
ACE_INLINE TAO_Base_Sequence::TAO_Base_Sequence | ( | CORBA::ULong | maximum, | |
void * | buffer | |||
) | [protected] |
Assume ownership and set length to 0.
ACE_INLINE TAO_Base_Sequence::TAO_Base_Sequence | ( | const TAO_Base_Sequence & | rhs | ) |
virtual void TAO_Base_Sequence::_allocate_buffer | ( | CORBA::ULong | length | ) | [pure virtual] |
Ensure that the buffer contains space for at least <length> elements. The constructor must be called for any new elements, the old ones (if any) must be copied into the buffer using operator= and then their destructors must be called. Finally the old buffer must be released.
Implemented in TAO_Unbounded_String_Sequence, TAO_Unbounded_WString_Sequence, TAO_Unbounded_Sequence< CORBA::Octet >, TAO_Unbounded_Sequence< T >, TAO_Bounded_Sequence< T, MAX >, TAO_Unbounded_Object_Sequence< T, T_var >, TAO_Bounded_Object_Sequence< T, T_var, MAX >, TAO_Unbounded_Pseudo_Sequence< T >, TAO_Bounded_Pseudo_Sequence< T, MAX >, TAO_Unbounded_Array_Sequence< T, T_slice, TAG >, TAO_Bounded_Array_Sequence< T, T_slice, TAG, MAX >, TAO_Bounded_String_Sequence< MAX >, TAO_Bounded_WString_Sequence< MAX >, TAO_Unbounded_Sequence< IIOP::ListenPoint >, TAO_Unbounded_Sequence< ACE_CDR::Double >, TAO_Unbounded_Sequence< ACE_CDR::Float >, TAO_Unbounded_Sequence< ULong >, TAO_Unbounded_Sequence< ACE_CDR::Long >, TAO_Unbounded_Sequence< IOP::TaggedProfile >, TAO_Unbounded_Sequence< ACE_CDR::Short >, TAO_Unbounded_Sequence< Messaging::PolicyValue >, TAO_Unbounded_Sequence< ACE_CDR::UShort >, TAO_Unbounded_Sequence< IOP::ServiceContext >, TAO_Unbounded_Sequence< CORBA::ULong >, TAO_Unbounded_Sequence< ACE_CDR::Char >, TAO_Unbounded_Sequence< ACE_CDR::LongLong >, TAO_Unbounded_Sequence< CORBA::ServiceDetail >, TAO_Unbounded_Sequence< ACE_CDR::WChar >, TAO_Unbounded_Sequence< ACE_CDR::ULongLong >, TAO_Unbounded_Sequence< ACE_CDR::LongDouble >, TAO_Unbounded_Sequence< TAO::IIOP_Endpoint_Info >, TAO_Unbounded_Sequence< ACE_CDR::Boolean >, TAO_Unbounded_Sequence< IOP::TaggedComponent >, TAO_Unbounded_Object_Sequence< CORBA::Policy, TAO_Objref_Var_T< Policy > >, and TAO_Unbounded_Object_Sequence< CORBA::DomainManager, TAO_Objref_Var_T< DomainManager > >.
virtual void TAO_Base_Sequence::_deallocate_buffer | ( | void | ) | [pure virtual] |
Must deallocate the buffer and then set it to zero.
Implemented in TAO_Unbounded_String_Sequence, TAO_Unbounded_WString_Sequence, TAO_Unbounded_Sequence< CORBA::Octet >, TAO_Unbounded_Sequence< T >, TAO_Bounded_Sequence< T, MAX >, TAO_Unbounded_Object_Sequence< T, T_var >, TAO_Bounded_Object_Sequence< T, T_var, MAX >, TAO_Unbounded_Pseudo_Sequence< T >, TAO_Bounded_Pseudo_Sequence< T, MAX >, TAO_Unbounded_Array_Sequence< T, T_slice, TAG >, TAO_Bounded_Array_Sequence< T, T_slice, TAG, MAX >, TAO_Bounded_String_Sequence< MAX >, TAO_Bounded_WString_Sequence< MAX >, TAO_Unbounded_Sequence< IIOP::ListenPoint >, TAO_Unbounded_Sequence< ACE_CDR::Double >, TAO_Unbounded_Sequence< ACE_CDR::Float >, TAO_Unbounded_Sequence< ULong >, TAO_Unbounded_Sequence< ACE_CDR::Long >, TAO_Unbounded_Sequence< IOP::TaggedProfile >, TAO_Unbounded_Sequence< ACE_CDR::Short >, TAO_Unbounded_Sequence< Messaging::PolicyValue >, TAO_Unbounded_Sequence< ACE_CDR::UShort >, TAO_Unbounded_Sequence< IOP::ServiceContext >, TAO_Unbounded_Sequence< CORBA::ULong >, TAO_Unbounded_Sequence< ACE_CDR::Char >, TAO_Unbounded_Sequence< ACE_CDR::LongLong >, TAO_Unbounded_Sequence< CORBA::ServiceDetail >, TAO_Unbounded_Sequence< ACE_CDR::WChar >, TAO_Unbounded_Sequence< ACE_CDR::ULongLong >, TAO_Unbounded_Sequence< ACE_CDR::LongDouble >, TAO_Unbounded_Sequence< TAO::IIOP_Endpoint_Info >, TAO_Unbounded_Sequence< ACE_CDR::Boolean >, TAO_Unbounded_Sequence< IOP::TaggedComponent >, TAO_Unbounded_Object_Sequence< CORBA::Policy, TAO_Objref_Var_T< Policy > >, and TAO_Unbounded_Object_Sequence< CORBA::DomainManager, TAO_Objref_Var_T< DomainManager > >.
void TAO_Base_Sequence::_downcast | ( | void * | target, | |
CORBA::Object * | src | |||
) | [virtual] |
Used for sequences of objects to downcast a recently demarshalled object reference into the right type.
void TAO_Base_Sequence::_shrink_buffer | ( | CORBA::ULong | new_length, | |
CORBA::ULong | old_length | |||
) | [virtual] |
Some sequences (of objects and strings) require some cleanup if the sequence is shrunk. The spec requires the destructor to release the objects only from position <0> to <length-1>; so shrink and then delete could result in a memory leak.
Reimplemented in TAO_Unbounded_String_Sequence, TAO_Unbounded_WString_Sequence, TAO_Unbounded_Sequence< T >, TAO_Bounded_Sequence< T, MAX >, TAO_Unbounded_Object_Sequence< T, T_var >, TAO_Bounded_Object_Sequence< T, T_var, MAX >, TAO_Unbounded_Pseudo_Sequence< T >, TAO_Bounded_Pseudo_Sequence< T, MAX >, TAO_Bounded_String_Sequence< MAX >, TAO_Bounded_WString_Sequence< MAX >, TAO_Unbounded_Sequence< IIOP::ListenPoint >, TAO_Unbounded_Sequence< ACE_CDR::Double >, TAO_Unbounded_Sequence< ACE_CDR::Float >, TAO_Unbounded_Sequence< ULong >, TAO_Unbounded_Sequence< ACE_CDR::Long >, TAO_Unbounded_Sequence< IOP::TaggedProfile >, TAO_Unbounded_Sequence< ACE_CDR::Short >, TAO_Unbounded_Sequence< Messaging::PolicyValue >, TAO_Unbounded_Sequence< ACE_CDR::UShort >, TAO_Unbounded_Sequence< IOP::ServiceContext >, TAO_Unbounded_Sequence< CORBA::ULong >, TAO_Unbounded_Sequence< ACE_CDR::Char >, TAO_Unbounded_Sequence< ACE_CDR::LongLong >, TAO_Unbounded_Sequence< CORBA::ServiceDetail >, TAO_Unbounded_Sequence< ACE_CDR::WChar >, TAO_Unbounded_Sequence< ACE_CDR::ULongLong >, TAO_Unbounded_Sequence< ACE_CDR::LongDouble >, TAO_Unbounded_Sequence< TAO::IIOP_Endpoint_Info >, TAO_Unbounded_Sequence< ACE_CDR::Boolean >, TAO_Unbounded_Sequence< IOP::TaggedComponent >, TAO_Unbounded_Object_Sequence< CORBA::Policy, TAO_Objref_Var_T< Policy > >, and TAO_Unbounded_Object_Sequence< CORBA::DomainManager, TAO_Objref_Var_T< DomainManager > >.
CORBA::Object * TAO_Base_Sequence::_upcast | ( | void * | src | ) | const [virtual] |
Used for sequences of object to convert from the derived type into the Object class.
void TAO_Base_Sequence::check_bounds | ( | char const * | filename, | |
unsigned long | lineno, | |||
CORBA::ULong | tao_idx, | |||
CORBA::ULong | tao_max | |||
) | const [protected] |
ACE_INLINE CORBA::ULong TAO_Base_Sequence::maximum | ( | void | ) | const |
Return the maximum length of the sequence.
ACE_INLINE TAO_Base_Sequence & TAO_Base_Sequence::operator= | ( | const TAO_Base_Sequence & | rhs | ) |
ACE_INLINE CORBA::Boolean TAO_Base_Sequence::release | ( | void | ) | const |
Returns the state of the sequence release flag.
friend class TAO_Marshal_Sequence [friend] |
We give access to TAO_Marshal_Sequence, this allows a safe yet small footprint implementation of the marshal engine.
Reimplemented in TAO_Unbounded_Sequence< CORBA::Octet >.
void* TAO_Base_Sequence::buffer_ [protected] |
The buffer with all the elements, casting must be done in derived classes.
CORBA::ULong TAO_Base_Sequence::length_ [protected] |
The current number of elements in the buffer.
CORBA::ULong TAO_Base_Sequence::maximum_ [protected] |
The maximum number of elements the buffer can contain.
CORBA::Boolean TAO_Base_Sequence::release_ [protected] |
If true then the sequence should release the buffer when it is destroyed.