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

# TAO_Bounded_Array_Sequence Class Template Reference

Bounded version of TAO_Unbounded_Array_Sequence. More...

`#include <Sequence_T.h>`

Inheritance diagram for TAO_Bounded_Array_Sequence:

[legend]
Collaboration diagram for TAO_Bounded_Array_Sequence:

[legend]
List of all members.

## Public Methods
| TAO_Bounded_Array_Sequence (void)
| default ctor. More...
| TAO_Bounded_Array_Sequence (CORBA::ULong length, T *value, CORBA::Boolean release=0)
| Constructor from data. More...
| TAO_Bounded_Array_Sequence (const TAO_Bounded_Array_Sequence< T, T_var, MAX > &)
| Copy constructor. More...
| ~TAO_Bounded_Array_Sequence (void)
| destructor. More...
TAO_Bounded_Array_Sequence & | operator= (const TAO_Bounded_Array_Sequence< T, T_var, MAX > &)
| Assignment from another Bounded sequence. More...
T & | operator[] (CORBA::ULong)
| operator[]. More...
const T & | operator[] (CORBA::ULong) const
| operator[]. More...
virtual void | _allocate_buffer (CORBA::ULong length)
| allocate a buffer of the requested length. The buffer is allocated for the right type. More...
virtual void | _deallocate_buffer (void)
| deallocate the buffer. More...
T * | get_buffer (CORBA::Boolean orphan=0)
| Allows read-write access to the underlying buffer. More...
const T * | get_buffer (void) const
| This function allows read-only access to the sequence buffer. More...
void | replace (CORBA::ULong max, CORBA::ULong length, T *data, CORBA::Boolean release=0)
| Allows the buffer underlying a sequence to be replaced. 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_Array_Sequence< T, T_var, MAX >

Bounded version of TAO_Unbounded_Array_Sequence.

Please see the documentation for the unbounded case.

## Constructor & Destructor Documentation

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

| default ctor.

template<class T, class T_var, size_t MAX>
ACE_INLINE TAO_Bounded_Array_Sequence< T, T_var, MAX >::TAO_Bounded_Array_Sequence | ( | CORBA::ULong | length,
|  | T * | data,
|  | CORBA::Boolean | release = 0
| ) |

| Constructor from data.

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

| Copy constructor.

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

| destructor.

## Member Function Documentation

template<class T, class T_var, size_t MAX>
void TAO_Bounded_Array_Sequence< T, T_var, MAX >::_allocate_buffer | ( | CORBA::ULong | length | ) | `[virtual]`

| allocate a buffer of the requested length. The buffer is allocated for the right type. Reimplemented from TAO_Base_Sequence.

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

| deallocate the buffer. Reimplemented from TAO_Base_Sequence.

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

| Allocate storage for a sequence..

template<class T, class T_var, size_t MAX>
ACE_INLINE void TAO_Bounded_Array_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>
ACE_INLINE const T * TAO_Bounded_Array_Sequence< T, T_var, MAX >::get_buffer | ( | void |  | ) | const

| This function allows read-only access to the sequence buffer. The sequence returns its buffer, allocating one of one has not yet been allocated. No direct modification of the returned buffer by the caller is permitted.

template<class T, class T_var, size_t MAX>
ACE_INLINE T * TAO_Bounded_Array_Sequence< T, T_var, MAX >::get_buffer | ( | CORBA::Boolean | orphan = 0 | ) |

| Allows read-write access to the underlying buffer. If <orphan> is FALSE the sequence returns a pointer to its buffer, allocating one if it has not yet done so. The number of elements in the buffer can be determined from the sequence <length> accessor. If the <orphan> argument to <get_buffer> is FALSE, the sequence maintains ownership of the underlying buffer. Elements in the returned buffer may be directly replaced by the caller. If the <orphan> argument to <get_buffer> is TRUE, the sequence yields ownership of the buffer to the caller. If <orphan> is TRUE and the sequence does not own its buffer (i.e., its <release> flag is FALSE), the return value is a null pointer. If the buffer is taken from the sequence using this form of <get_buffer>, the sequence reverts to the same state it would have if constructed using its default constructor. The caller becomes responsible for eventually freeing each element of the returned buffer (for strings, wide string, and object references), and then freeing the returned buffer itself using <freebuf>.

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

| Assignment from another Bounded sequence.

template<class T, class T_var, size_t MAX>
ACE_INLINE const T & TAO_Bounded_Array_Sequence< T, T_var, MAX >::operator[] | ( | CORBA::ULong | i | ) | const

| operator[].

template<class T, class T_var, size_t MAX>
ACE_INLINE T & TAO_Bounded_Array_Sequence< T, T_var, MAX >::operator[] | ( | CORBA::ULong | i | ) |

| operator[].

template<class T, class T_var, size_t MAX>
ACE_INLINE void TAO_Bounded_Array_Sequence< T, T_var, MAX >::replace | ( | CORBA::ULong | max,
|  | CORBA::ULong | length,
|  | T * | data,
|  | CORBA::Boolean | release = 0
| ) |

| Allows the buffer underlying a sequence to be replaced. The parameters to <replace> are identical in type, order, and purpose to those for the <T *data> constructor for the sequence.

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

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