#include <Sequence_T.h>
Inheritance diagram for TAO_Unbounded_Pseudo_Sequence< T >:
Public Member Functions | |
TAO_Unbounded_Pseudo_Sequence (void) | |
default ctor | |
TAO_Unbounded_Pseudo_Sequence (CORBA::ULong max) | |
Constructor with a "hint" for the maximum capacity. | |
TAO_Unbounded_Pseudo_Sequence (CORBA::ULong maximum, CORBA::ULong length, T **data, CORBA::Boolean release=0) | |
Constructor with a given buffer. | |
TAO_Unbounded_Pseudo_Sequence (const TAO_Unbounded_Pseudo_Sequence< T > &) | |
Copy ctor, deep copies. | |
~TAO_Unbounded_Pseudo_Sequence (void) | |
dtor releases all the contained elements. | |
TAO_Unbounded_Pseudo_Sequence< T > & | operator= (const TAO_Unbounded_Pseudo_Sequence< T > &) |
TAO_Pseudo_Object_Manager< T > | operator[] (CORBA::ULong slot) const |
read-write accessor | |
virtual void | _allocate_buffer (CORBA::ULong length) |
virtual void | _deallocate_buffer (void) |
Must deallocate the buffer and then set it to zero. | |
virtual void | _shrink_buffer (CORBA::ULong new_length, CORBA::ULong old_length) |
Static Public Member Functions | |
static T ** | allocbuf (CORBA::ULong) |
static void | freebuf (T **) |
Release all the elements. |
Some IDL types (including pseudo objects) require that sequences on them have a "manager" class, in charge of handling the object lifetime. This parametric class implements those sequences. In general the sequence is similar to Object_Sequente, except for some TAO internal details. The complete documentation of each method is provided in TAO_Unbounded_Object_Sequece
ACE_INLINE TAO_Unbounded_Pseudo_Sequence< T >::TAO_Unbounded_Pseudo_Sequence | ( | void | ) |
default ctor
TAO_Unbounded_Pseudo_Sequence< T >::TAO_Unbounded_Pseudo_Sequence | ( | CORBA::ULong | max | ) |
Constructor with a "hint" for the maximum capacity.
ACE_INLINE TAO_Unbounded_Pseudo_Sequence< T >::TAO_Unbounded_Pseudo_Sequence | ( | CORBA::ULong | maximum, | |
CORBA::ULong | length, | |||
T ** | data, | |||
CORBA::Boolean | release = 0 | |||
) |
Constructor with a given buffer.
TAO_Unbounded_Pseudo_Sequence< T >::TAO_Unbounded_Pseudo_Sequence | ( | const TAO_Unbounded_Pseudo_Sequence< T > & | ) |
Copy ctor, deep copies.
TAO_Unbounded_Pseudo_Sequence< T >::~TAO_Unbounded_Pseudo_Sequence | ( | void | ) |
dtor releases all the contained elements.
void TAO_Unbounded_Pseudo_Sequence< T >::_allocate_buffer | ( | CORBA::ULong | length | ) | [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.
Implements TAO_Base_Sequence.
void TAO_Unbounded_Pseudo_Sequence< T >::_deallocate_buffer | ( | void | ) | [virtual] |
void TAO_Unbounded_Pseudo_Sequence< T >::_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 from TAO_Base_Sequence.
T ** TAO_Unbounded_Pseudo_Sequence< T >::allocbuf | ( | CORBA::ULong | ) | [static] |
The allocbuf function allocates a vector of T elements that can be passed to the T *data constructor.
void TAO_Unbounded_Pseudo_Sequence< T >::freebuf | ( | T ** | ) | [static] |
Release all the elements.
TAO_Unbounded_Pseudo_Sequence< T > & TAO_Unbounded_Pseudo_Sequence< T >::operator= | ( | const TAO_Unbounded_Pseudo_Sequence< T > & | ) |
The assignment operator first releases all object reference members and frees all string members, and then performs a deepcopy to create a new structure.
ACE_INLINE TAO_Pseudo_Object_Manager< T > TAO_Unbounded_Pseudo_Sequence< T >::operator[] | ( | CORBA::ULong | slot | ) | const |
read-write accessor