#include <Sequence_T.h>
Inheritance diagram for TAO_Bounded_Object_Sequence< T, T_var, MAX >:
Public Member Functions | |
TAO_Bounded_Object_Sequence (void) | |
TAO_Bounded_Object_Sequence (CORBA::ULong length, T **value, CORBA::Boolean release=0) | |
Constructor from data. | |
TAO_Bounded_Object_Sequence (const TAO_Bounded_Object_Sequence< T, T_var, MAX > &) | |
Copy constructor. | |
~TAO_Bounded_Object_Sequence (void) | |
destructor | |
TAO_Bounded_Object_Sequence< T, T_var, MAX > & | operator= (const TAO_Bounded_Object_Sequence< T, T_var, MAX > &) |
Assignment from another Bounded sequence. | |
TAO_Object_Manager< T, T_var > | 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 length) |
Allocate storage for a sequence.. | |
static void | freebuf (T **buffer) |
Please see the documentation for the unbounded case.
TAO_Bounded_Object_Sequence< T, T_var, MAX >::TAO_Bounded_Object_Sequence | ( | void | ) |
For bounded sequences, the maximum length is part of the type and cannot be set or modified, while for unbounded sequences, the default constructor also sets the maximum length to 0. The default constructor for a bounded sequence always allocates a contents vector, so it always sets the release flag to TRUE.
ACE_INLINE TAO_Bounded_Object_Sequence< T, T_var, MAX >::TAO_Bounded_Object_Sequence | ( | CORBA::ULong | length, | |
T ** | value, | |||
CORBA::Boolean | release = 0 | |||
) |
Constructor from data.
TAO_Bounded_Object_Sequence< T, T_var, MAX >::TAO_Bounded_Object_Sequence | ( | const TAO_Bounded_Object_Sequence< T, T_var, MAX > & | ) |
Copy constructor.
ACE_INLINE TAO_Bounded_Object_Sequence< T, T_var, MAX >::~TAO_Bounded_Object_Sequence | ( | void | ) |
destructor
void TAO_Bounded_Object_Sequence< T, T_var, MAX >::_allocate_buffer | ( | CORBA::ULong | length | ) | [virtual] |
No default to workaround egcs problem with templates and namespaces
Implements TAO_Base_Sequence.
void TAO_Bounded_Object_Sequence< T, T_var, MAX >::_deallocate_buffer | ( | void | ) | [virtual] |
void TAO_Bounded_Object_Sequence< T, T_var, MAX >::_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_Bounded_Object_Sequence< T, T_var, MAX >::allocbuf | ( | CORBA::ULong | length | ) | [static] |
Allocate storage for a sequence..
void TAO_Bounded_Object_Sequence< T, T_var, MAX >::freebuf | ( | T ** | buffer | ) | [static] |
Free a buffer allocated by allocbuf() and release each element on it.
TAO_Bounded_Object_Sequence< T, T_var, MAX > & TAO_Bounded_Object_Sequence< T, T_var, MAX >::operator= | ( | const TAO_Bounded_Object_Sequence< T, T_var, MAX > & | ) |
Assignment from another Bounded sequence.
ACE_INLINE TAO_Object_Manager< T, T_var > TAO_Bounded_Object_Sequence< T, T_var, MAX >::operator[] | ( | CORBA::ULong | slot | ) | const |
Read-write accessor.