![]() |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/data/Array.h>
Public Member Functions | |
AllocArray (void) | |
AllocArray (int count, T *buffer) | |
AllocArray (int count) | |
AllocArray (int count, const T &val) | |
AllocArray (const Array< T > &t) | |
AllocArray (const AllocArray< T > &t) | |
~AllocArray (void) | |
void | copy (const Array< T > &t) |
void | tie (int cnt, T *buffer) |
void | tie (const Array< T > &t) |
AllocArray< T > & | operator= (const Array< T > &t) |
AllocArray< T > & | operator= (const AllocArray< T > &t) |
![]() | |
Array (void) | |
Array (int count, T *buffer) | |
const T * | buffer (void) const |
T * | buffer (void) |
int | size (void) const |
void | set (int count, T *buffer) |
void | set (const Array< T > &t) |
void | copy (const Array &t) |
void | fill (const T &val) |
const T * | operator() (void) const |
T * | operator() (void) |
Array< T > & | operator= (const Array< T > &t) |
Iter | items (void) const |
Iter | operator* (void) const |
Iter | begin (void) const |
Iter | end (void) const |
int | count (void) const |
bool | contains (const T &item) |
template<class C > | |
bool | containsAll (const C &c) |
bool | isEmpty (void) const |
operator bool (void) const | |
bool | equals (const Array< T > &a) |
bool | operator== (const Array< T > &a) const |
bool | operator!= (const Array< T > &a) const |
bool | operator<= (const Array< T > &a) const |
bool | operator< (const Array< T > &a) const |
bool | operator>= (const Array< T > &a) const |
bool | operator> (const Array< T > &a) const |
int | length (void) const |
const T & | get (int idx) const |
int | indexOf (const T &v, int i=0) const |
int | lastIndexOf (const T &v, int i=-1) const |
const T & | operator[] (int idx) const |
void | set (int idx, const T &val) |
void | set (const Iter &i, const T &val) |
T & | get (int idx) |
T & | operator[] (int idx) |
Additional Inherited Members | |
![]() | |
typedef T | t |
typedef Array< T > | self_t |
![]() | |
static const Array< T > | null |
![]() | |
int | cnt |
T * | buf |
An AllocArray is an Array that manages its own memory. It may be built giving its size and from another C array or Array. It will create its memory to store the array and it will free it at destruction time.
Only the set() methods can assign to the AllocArray a memory not allocated by itself. If such a method is called, it will receive the given array (and memory) and will free it when it will be destructed.
T | Type of elements stored in the array. |
|
inline |
Build an empty array.
|
inline |
Build an array by copying the given array.
count | Element count. |
buffer | Containing the element to copy. |
|
inline |
Allocate an array with count size.
count | Array element count. |
|
inline |
Allocate an array with count element and initialize them with val.
count | Element count. |
val | Initialization value. |
|
inline |
Build a copy of the given array.
|
inline |
Build a copy of the given array.
|
inline |
Perform a copy inside the current array of the given array.
t | Copied array. |
Referenced by AllocArray< elm::String >::operator=().
|
inline |
Same as copy().
|
inline |
Same as copy().
|
inline |