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

# TAO_Bounded_Object_Sequence Class Template Reference

Parametric sequence for types that require managers. More...

`#include <Sequence_T.h>`

Inheritance diagram for TAO_Bounded_Object_Sequence:

[legend]
Collaboration diagram for TAO_Bounded_Object_Sequence:

[legend]
List of all members.

## Public Methods
| TAO_Bounded_Object_Sequence (void)
| TAO_Bounded_Object_Sequence (CORBA::ULong length, T **value, CORBA::Boolean release=0)
| Constructor from data. More...
| TAO_Bounded_Object_Sequence (const TAO_Bounded_Object_Sequence< T, T_var, MAX > &)
| Copy constructor. More...
| ~TAO_Bounded_Object_Sequence (void)
| destructor. More...
TAO_Bounded_Object_Sequence & | operator= (const TAO_Bounded_Object_Sequence< T, T_var, MAX > &)
| Assignment from another Bounded sequence. More...
TAO_Object_Manager< T, T_var > | operator[] (CORBA::ULong slot) const
| Read-write accessor. More...
virtual void | _allocate_buffer (CORBA::ULong length)
| No default to workaround egcs problem with templates and namespaces. 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)
virtual void | _downcast (void *target, CORBA_Object *src ACE_ENV_ARG_DECL_WITH_DEFAULTS)
| Used for sequences of objects to downcast a recently demarshalled object reference into the right type. More...
virtual CORBA_Object * | _upcast (void *src) const
| Used for sequences of object to convert from the derived type into the Object class. More...
## Static Public Methods
T ** | allocbuf (CORBA::ULong length)
| Allocate storage for a sequence.. More...
void | freebuf (T **buffer)
| Free a buffer allocated by allocbuf() and release each element on it. More...

## Detailed Description

### template<class T, class T_var, size_t MAX>
class TAO_Bounded_Object_Sequence< T, T_var, MAX >

Parametric sequence for types that require managers.

Please see the documentation for the unbounded case.

## Constructor & Destructor Documentation

template<class T, class T_var, size_t MAX>
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.

template<class T, class T_var, size_t MAX>
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.

template<class T, class T_var, size_t MAX>
TAO_Bounded_Object_Sequence< T, T_var, MAX >::TAO_Bounded_Object_Sequence | ( | const TAO_Bounded_Object_Sequence< T, T_var, MAX > & | rhs | ) |

| Copy constructor.

template<class T, class T_var, size_t MAX>
ACE_INLINE TAO_Bounded_Object_Sequence< T, T_var, MAX >::~TAO_Bounded_Object_Sequence | ( | void |  | ) |

| destructor.

## Member Function Documentation

template<class T, class T_var, size_t MAX>
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. Reimplemented from TAO_Base_Sequence.

template<class T, class T_var, size_t MAX>
void TAO_Bounded_Object_Sequence< T, T_var, MAX >::_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, size_t MAX>
void TAO_Bounded_Object_Sequence< T, T_var, MAX >::_downcast | ( | void * | target,
|  | CORBA_Object *src | ACE_ENV_ARG_DECL
| ) | `[virtual]`

| Used for sequences of objects to downcast a recently demarshalled object reference into the right type. Reimplemented from TAO_Base_Sequence.

template<class T, class T_var, size_t MAX>
void TAO_Bounded_Object_Sequence< T, T_var, MAX >::_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, size_t MAX>
CORBA_Object * TAO_Bounded_Object_Sequence< T, T_var, MAX >::_upcast | ( | void * | src | ) | const`[virtual]`

| Used for sequences of object to convert from the derived type into the Object class. Reimplemented from TAO_Base_Sequence.

template<class T, class T_var, size_t MAX>
T ** TAO_Bounded_Object_Sequence< T, T_var, MAX >::allocbuf | ( | CORBA::ULong | length | ) | `[static]`

| Allocate storage for a sequence..

template<class T, class T_var, size_t MAX>
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.

template<class T, class T_var, size_t MAX>
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 > & | rhs | ) |

| Assignment from another Bounded sequence.

template<class T, class T_var, size_t MAX>
ACE_INLINE TAO_Object_Manager< T, T_var > TAO_Bounded_Object_Sequence< T, T_var, MAX >::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