|
| ACE_Vector (const size_t init_size=DEFAULT_SIZE, ACE_Allocator *alloc=0) |
|
| ~ACE_Vector () |
|
size_t | capacity (void) const |
|
size_t | size (void) const |
|
void | clear (void) |
|
void | resize (const size_t new_size, const T &t) |
|
void | push_back (const T &elem) |
|
void | pop_back (void) |
|
void | dump (void) const |
|
bool | operator== (const ACE_Vector< T, DEFAULT_SIZE > &s) const |
| Equality comparison operator. More...
|
|
bool | operator!= (const ACE_Vector< T, DEFAULT_SIZE > &s) const |
| Inequality comparison operator. More...
|
|
void | swap (ACE_Vector &rhs) |
|
| ACE_Array (size_t size=0, ACE_Allocator *alloc=0) |
| Dynamically create an uninitialized array. More...
|
|
| ACE_Array (size_t size, const T &default_value, ACE_Allocator *alloc=0) |
| Dynamically initialize the entire array to the {default_value}. More...
|
|
| ACE_Array (const ACE_Array< T > &s) |
| Copy constructor. More...
|
|
void | operator= (const ACE_Array< T > &s) |
| Assignment operator. More...
|
|
bool | operator== (const ACE_Array< T > &s) const |
| Equality comparison operator. More...
|
|
bool | operator!= (const ACE_Array< T > &s) const |
| Inequality comparison operator. More...
|
|
ACE_DECLARE_STL_REVERSE_ITERATORS | ACE_Array_Base (size_type size=0, ACE_Allocator *the_allocator=0) |
| Dynamically create an uninitialized array. More...
|
|
| ACE_Array_Base (size_type size, T const &default_value, ACE_Allocator *the_allocator=0) |
| Dynamically initialize the entire array to the default_value. More...
|
|
| ACE_Array_Base (ACE_Array_Base< T > const &s) |
|
void | operator= (ACE_Array_Base< T > const &s) |
|
| ~ACE_Array_Base (void) |
| Clean up the array (e.g., delete dynamically allocated memory). More...
|
|
T & | operator[] (size_type slot) |
|
T const & | operator[] (size_type slot) const |
|
int | set (T const &new_item, size_type slot) |
|
int | get (T &item, size_type slot) const |
|
size_type | size (void) const |
| Returns the <cur_size_> of the array. More...
|
|
int | size (size_type new_size) |
|
size_type | max_size (void) const |
| Returns the <max_size_> of the array. More...
|
|
int | max_size (size_type new_size) |
|
void | swap (ACE_Array_Base< T > &array) |
|
iterator | begin (void) |
|
iterator | end (void) |
|
const_iterator | begin (void) const |
|
const_iterator | end (void) const |
|
reverse_iterator | rbegin (void) |
|
reverse_iterator | rend (void) |
|
const_reverse_iterator | rbegin (void) const |
|
const_reverse_iterator | rend (void) const |
|
template<class T, size_t DEFAULT_SIZE = ACE_VECTOR_DEFAULT_SIZE>
class ACE_Vector< T, DEFAULT_SIZE >
Defines an STL-like vector container.
This is an STL-like template vector container, a wrapper around ACE_Array. It provides at least the basic std::vector look and feel: push_back(), clear(), resize(), capacity(). This template class uses the copy semantic paradigm, though it is okay to use reference counted smart pointers (see ACE_Ptr<T>) with this template class.
Requirements and Performance Characteristics
- Internal Structure ACE_Array
- Duplicates allowed? Yes
- Random access allowed? No
- Search speed N/A
- Insert/replace speed Linear
- Iterator still valid after change to container? Yes
- Frees memory for removed elements? No
- Items inserted by Value
- Requirements for contained type
- Default constructor
- Copy constructor
- operator=
template<class T , size_t DEFAULT_SIZE>
void ACE_Vector< T, DEFAULT_SIZE >::dump |
( |
void |
| ) |
const |
This function dumps the content of the vector. TO BE MOVED out of this class. It needs to be implemented as a global template function that accepts a const ACE_Vector<T>, in order to make instances of this class compile on Linux, AIX. G++ and xlC have template instantiation algoriths, which are different from the one in Visual C++. The algorithms try to instantiate ALL methods declared in the template class, regardless of whether the functions are used or not. That is, all of the classes, that are used as elements in ACE_Vector's, have to have the dump() methods defined in them (seems to be overkill).
This function calls T::dump() for each element of the vector.