A dynamic array class. More...
#include <Containers_T.h>
Public Types | |
typedef T | TYPE |
typedef ACE_Array_Iterator< T > | ITERATOR |
Public Member Functions | |
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) | |
Copy constructor. | |
void | operator= (const ACE_Array< T > &s) |
Assignment operator. | |
bool | operator== (const ACE_Array< T > &s) const |
Equality comparison operator. | |
bool | operator!= (const ACE_Array< T > &s) const |
Inequality comparison operator. |
A dynamic array class.
This class extends ACE_Array_Base, adding comparison operators.
Requirements and Performance Characteristics
Definition at line 1991 of file Containers_T.h.
typedef ACE_Array_Iterator<T> ACE_Array< T >::ITERATOR |
Reimplemented from ACE_Array_Base< T >.
Definition at line 1996 of file Containers_T.h.
Reimplemented from ACE_Array_Base< T >.
Definition at line 1995 of file Containers_T.h.
ACE_Array< T >::ACE_Array | ( | size_t | size = 0 , |
|
ACE_Allocator * | alloc = 0 | |||
) | [inline] |
Dynamically create an uninitialized array.
Initialize an empty array of the specified size using the provided allocation strategy.
Definition at line 272 of file Containers_T.inl.
: ACE_Array_Base<T> (size, alloc) { }
ACE_Array< T >::ACE_Array | ( | size_t | size, | |
const T & | default_value, | |||
ACE_Allocator * | alloc = 0 | |||
) | [inline] |
Dynamically initialize the entire array to the {default_value}.
Initialize an array the given size placing the default_value in each index.
Definition at line 279 of file Containers_T.inl.
: ACE_Array_Base<T> (size, default_value, alloc) { }
Copy constructor.
The copy constructor performs initialization by making an exact copy of the contents of parameter {s}, i.e., *this == s will return true.
Definition at line 289 of file Containers_T.inl.
: ACE_Array_Base<T> (s) { }
Inequality comparison operator.
Compare this array with {s} for inequality such that {*this} != {s} is always the complement of the boolean return value of {*this} == {s}.
Definition at line 308 of file Containers_T.inl.
{ return !(*this == s); }
Assignment operator.
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 {array_} is >= than {s.max_size_} we can copy it without reallocating. However, if {max_size_} is < {s.max_size_} we must delete the {array_}, reallocate a new {array_}, and then copy the contents of {s}.
Definition at line 297 of file Containers_T.inl.
{ // Check for "self-assignment". if (this != &s) this->ACE_Array_Base<T>::operator= (s); }
Equality comparison operator.
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.
Definition at line 1913 of file Containers_T.cpp.