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

ACE_Array Class Template Reference

Implement a dynamic array class. More...

#include <Containers_T.h>

Inheritance diagram for ACE_Array

Inheritance graph
[legend]
Collaboration diagram for ACE_Array:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T TYPE
typedef ACE_Array_Iterator<T> ITERATOR

Public Methods

 ACE_Array (size_t size = 0, ACE_Allocator* alloc = 0)
 Dynamically create an uninitialized array.

 ACE_Array (size_t size, const T &default_value, ACE_Allocator* alloc = 0)
 Dynamically initialize the entire array to the <default_value>.

 ACE_Array (const ACE_Array<T> &s)
void operator= (const ACE_Array<T> &s)
int operator== (const ACE_Array<T> &s) const
int operator!= (const ACE_Array<T> &s) const

Detailed Description

template<class T> template class ACE_Array

Implement a dynamic array class.

This class extends ACE_Array_Base, it provides comparison operators.


Member Typedef Documentation

template<classT>
typedef ACE_Array_Iterator<T> ACE_Array<T>::ITERATOR
 

Reimplemented from ACE_Array_Base.

template<classT>
typedef T ACE_Array<T>::TYPE
 

Reimplemented from ACE_Array_Base.


Constructor & Destructor Documentation

template<classT>
ACE_INLINE ACE_Array< T >::ACE_Array<T> ( size_t size = 0,
ACE_Allocator * alloc = 0 )
 

Dynamically create an uninitialized array.

template<classT>
ACE_INLINE ACE_Array< T >::ACE_Array<T> ( size_t size,
const T & default_value,
ACE_Allocator * alloc = 0 )
 

Dynamically initialize the entire array to the <default_value>.

template<classT>
ACE_INLINE ACE_Array< T >::ACE_Array<T> ( const ACE_Array< T >& s )
 

The copy constructor performs initialization by making an exact copy of the contents of parameter <s>, i.e., *this == s will return true.


Member Function Documentation

template<classT>
ACE_INLINE int ACE_Array< T >::operator!= ( const ACE_Array< T >& s ) const
 

Compare this array with <s> for inequality such that <*this> != <s> is always the complement of the boolean return value of <*this> == <s>.

template<classT>
ACE_INLINE void ACE_Array< T >::operator= ( const ACE_Array< T >& s )
 

Assignment operator performs an assignment by making an exact copy of the contents of parameter <s>, i.e., *this == s will return true. Note that if the <max_size_> of is >= than <s.max_size_> we can copy it without reallocating. However, if <max_size_> is < <s.max_size_> we must delete the , reallocate a new , and then copy the contents of <s>.

template<classT>
int ACE_Array<T>::operator== ( const ACE_Array< T >& s ) const
 

Compare this array with <s> for equality. Two arrays are equal if their <size>'s are equal and all the elements from 0 .. <size> are equal.


The documentation for this class was generated from the following files:
Generated at Sat Dec 1 11:00:40 2001 for ACE by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000