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

# TAO_Bounded_Pseudo_Sequence< T, MAX > Class Template Reference

Bounded version of TAO_Unbounded_Pseudo_Sequence. More...

`#include <Sequence_T.h>`

Inheritance diagram for TAO_Bounded_Pseudo_Sequence< T, MAX >:

[legend]
Collaboration diagram for TAO_Bounded_Pseudo_Sequence< T, MAX >:

[legend]
List of all members.

## Public Methods
| TAO_Bounded_Pseudo_Sequence (void)
| default ctor.
| TAO_Bounded_Pseudo_Sequence (CORBA::ULong length, T **value, CORBA::Boolean release=0)
| Constructor from data.
| TAO_Bounded_Pseudo_Sequence (const TAO_Bounded_Pseudo_Sequence< T, MAX > &)
| Copy constructor.
| ~TAO_Bounded_Pseudo_Sequence (void)
| destructor
TAO_Bounded_Pseudo_Sequence & | operator= (const TAO_Bounded_Pseudo_Sequence< T, MAX > &)
| Assignment from another Bounded sequence.
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 Methods
T ** | allocbuf (CORBA::ULong length)
| Allocate storage for a sequence..
void | freebuf (T **buffer)

## Detailed Description

### template<typename T, size_t MAX>
class TAO_Bounded_Pseudo_Sequence< T, MAX >

Bounded version of TAO_Unbounded_Pseudo_Sequence.

Please see the documentation for the unbounded case.

## Constructor & Destructor Documentation

template<typename T, size_t MAX>
TAO_Bounded_Pseudo_Sequence< T, MAX >::TAO_Bounded_Pseudo_Sequence | ( | void |  | ) |

| default ctor.

template<typename T, size_t MAX>
ACE_INLINE TAO_Bounded_Pseudo_Sequence< T, MAX >::TAO_Bounded_Pseudo_Sequence | ( | CORBA::ULong | length,
|  | T ** | value,
|  | CORBA::Boolean | release = 0
| ) |

| Constructor from data.

template<typename T, size_t MAX>
TAO_Bounded_Pseudo_Sequence< T, MAX >::TAO_Bounded_Pseudo_Sequence | ( | const TAO_Bounded_Pseudo_Sequence< T, MAX > & |  | ) |

| Copy constructor.

template<typename T, size_t MAX>
ACE_INLINE TAO_Bounded_Pseudo_Sequence< T, MAX >::~TAO_Bounded_Pseudo_Sequence | ( | void |  | ) |

| destructor

## Member Function Documentation

template<typename T, size_t MAX>
void TAO_Bounded_Pseudo_Sequence< T, MAX >::_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.

template<typename T, size_t MAX>
void TAO_Bounded_Pseudo_Sequence< T, MAX >::_deallocate_buffer | ( | void |  | ) | `[virtual]`

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

template<typename T, size_t MAX>
void TAO_Bounded_Pseudo_Sequence< T, 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.

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

| Allocate storage for a sequence..

template<typename T, size_t MAX>
void TAO_Bounded_Pseudo_Sequence< T, MAX >::freebuf | ( | T ** | buffer | ) | `[static]`

| Free a buffer allocated by allocbuf() and release each element on it.

template<typename T, size_t MAX>
TAO_Bounded_Pseudo_Sequence< T, MAX > & TAO_Bounded_Pseudo_Sequence< T, MAX >::operator= | ( | const TAO_Bounded_Pseudo_Sequence< T, MAX > & |  | ) |

| Assignment from another Bounded sequence.

template<typename T, size_t MAX>
ACE_INLINE TAO_Pseudo_Object_Manager< T > TAO_Bounded_Pseudo_Sequence< T, 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