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

# TAO_Unbounded_Pseudo_Sequence Class Template Reference

Parametric sequence for pseudo objects. More...

`#include <Sequence_T.h>`

Inheritance diagram for TAO_Unbounded_Pseudo_Sequence:

[legend]
Collaboration diagram for TAO_Unbounded_Pseudo_Sequence:

[legend]
List of all members.

## Public Methods
| TAO_Unbounded_Pseudo_Sequence (void)
| default ctor. More...
| TAO_Unbounded_Pseudo_Sequence (CORBA::ULong max)
| Constructor with a "hint" for the maximum capacity. More...
| TAO_Unbounded_Pseudo_Sequence (CORBA::ULong maximum, CORBA::ULong length, T **data, CORBA::Boolean release=0)
| Constructor with a given buffer. More...
| TAO_Unbounded_Pseudo_Sequence (const TAO_Unbounded_Pseudo_Sequence< T, T_var > &)
| Copy ctor, deep copies. More...
| ~TAO_Unbounded_Pseudo_Sequence (void)
| dtor releases all the contained elements. More...
TAO_Unbounded_Pseudo_Sequence< T, T_var > & | operator= (const TAO_Unbounded_Pseudo_Sequence< T, T_var > &)
| The assignment operator first releases all object reference members and frees all string members, and then performs a deepcopy to create a new structure. More...
TAO_Pseudo_Object_Manager< T, T_var > | operator[] (CORBA::ULong slot) const
| read-write accessor. More...
virtual void | _allocate_buffer (CORBA::ULong length)
| Ensure that the buffer contains space for at least <length> elements. More...
virtual void | _deallocate_buffer (void)
| Must deallocate the buffer and then set it to zero. More...
virtual void | _shrink_buffer (CORBA::ULong new_length, CORBA::ULong old_length)
| Some sequences (of objects and strings) require some cleanup if the sequence is shrunk. More...
## Static Public Methods
T ** | allocbuf (CORBA::ULong)
| The allocbuf function allocates a vector of T elements that can be passed to the T *data constructor. More...
void | freebuf (T **)
| Release all the elements. More...

## Detailed Description

### template<class T, class T_var>
class TAO_Unbounded_Pseudo_Sequence< T, T_var >

Parametric sequence for pseudo objects.

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

## Constructor & Destructor Documentation

template<class T, class T_var>
ACE_INLINE TAO_Unbounded_Pseudo_Sequence< T, T_var >::TAO_Unbounded_Pseudo_Sequence | ( | void |  | ) |

| default ctor.

template<class T, class T_var>
TAO_Unbounded_Pseudo_Sequence< T, T_var >::TAO_Unbounded_Pseudo_Sequence | ( | CORBA::ULong | maximum | ) |

| Constructor with a "hint" for the maximum capacity.

template<class T, class T_var>
ACE_INLINE TAO_Unbounded_Pseudo_Sequence< T, T_var >::TAO_Unbounded_Pseudo_Sequence | ( | CORBA::ULong | maximum,
|  | CORBA::ULong | length,
|  | T ** | value,
|  | CORBA::Boolean | release = 0
| ) |

| Constructor with a given buffer.

template<class T, class T_var>
TAO_Unbounded_Pseudo_Sequence< T, T_var >::TAO_Unbounded_Pseudo_Sequence | ( | const TAO_Unbounded_Pseudo_Sequence< T, T_var > & | rhs | ) |

| Copy ctor, deep copies.

template<class T, class T_var>
TAO_Unbounded_Pseudo_Sequence< T, T_var >::~TAO_Unbounded_Pseudo_Sequence | ( | void |  | ) |

| dtor releases all the contained elements.

## Member Function Documentation

template<class T, class T_var>
void TAO_Unbounded_Pseudo_Sequence< T, T_var >::_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. Reimplemented from TAO_Base_Sequence.

template<class T, class T_var>
void TAO_Unbounded_Pseudo_Sequence< T, T_var >::_deallocate_buffer | ( | void |  | ) | `[virtual]`

| Must deallocate the buffer and then set it to zero. Reimplemented from TAO_Base_Sequence.

template<class T, class T_var>
void TAO_Unbounded_Pseudo_Sequence< T, T_var >::_shrink_buffer | ( | CORBA::ULong | nl,
|  | CORBA::ULong | ol
| ) | `[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.

template<class T, class T_var>
T ** TAO_Unbounded_Pseudo_Sequence< T, T_var >::allocbuf | ( | CORBA::ULong | nelems | ) | `[static]`

| The allocbuf function allocates a vector of T elements that can be passed to the T *data constructor.

template<class T, class T_var>
void TAO_Unbounded_Pseudo_Sequence< T, T_var >::freebuf | ( | T ** | buffer | ) | `[static]`

| Release all the elements.

template<class T, class T_var>
TAO_Unbounded_Pseudo_Sequence< T, T_var > & TAO_Unbounded_Pseudo_Sequence< T, T_var >::operator= | ( | const TAO_Unbounded_Pseudo_Sequence< T, T_var > & | rhs | ) |

| The assignment operator first releases all object reference members and frees all string members, and then performs a deepcopy to create a new structure.

template<class T, class T_var>
ACE_INLINE TAO_Pseudo_Object_Manager< T, T_var > TAO_Unbounded_Pseudo_Sequence< T, T_var >::operator[] | ( | CORBA::ULong | slot | ) | const

| read-write accessor.

The documentation for this class was generated from the following files:

- Sequence_T.h
- Sequence_T.cpp
- Sequence_T.i