Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
elm::array Namespace Reference

Classes

class  fast
 
class  slow
 

Functions

template<class T >
void copy (T *target, const T *source, int size)
 
template<class T >
void copy_back (T *target, const T *source, int size)
 
template<class T >
void move (T *target, const T *source, int size)
 
template<class T >
void set (T *target, int size, const T &v)
 
template<class T >
void clear (T *target, int size)
 
template<class T >
bool equals (const T *t1, const T *t2, int size)
 
template<class T >
void construct (T *t, int size)
 
template<class T >
void destruct (T *t, int size)
 
void copy (cstring *d, cstring *a, int s)
 
void move (cstring *d, cstring *a, int s)
 
void clear (cstring *d, int s)
 
template<class T >
void reverse (T *a, int n)
 

Function Documentation

◆ clear() [1/2]

void elm::array::clear ( cstring d,
int  s 
)
inline

References clear().

◆ clear() [2/2]

void clear ( T *  target,
int  size 
)
inline

Set the items of an array of the given size to 0.

Parameters
targetTarget array.
sizeSize of both arrays.

Referenced by clear().

◆ construct()

void elm::array::construct ( T *  t,
int  size 
)
inline

◆ copy() [1/2]

void elm::array::copy ( cstring d,
cstring a,
int  s 
)
inline

References copy().

◆ copy() [2/2]

void copy ( T *  target,
const T *  source,
int  size 
)
inline

Copy source array of the given size to the target as fast as possible. The arrays must not overlap.

Parameters
targetTarget array.
sourceSource array.
sizeSize of both arrays.

Referenced by StaticStack< Pair< Node *, dir_t >, MAX_HEIGHT >::copy(), Array< elm::String >::copy(), WAHVector::copy(), copy(), builder::copy(), Vector< elm::dtd::AbstractAttribute * >::copy(), Buffer::copyFrom(), Buffer::copyTo(), Vector< elm::dtd::AbstractAttribute * >::grow(), Bag< T >::make(), BitVector::resize(), and WAHVector::WAHVector().

◆ copy_back()

void elm::array::copy_back ( T *  target,
const T *  source,
int  size 
)
inline

◆ destruct()

void elm::array::destruct ( T *  t,
int  size 
)
inline

◆ equals()

bool elm::array::equals ( const T *  t1,
const T *  t2,
int  size 
)
inline

◆ move() [1/2]

void elm::array::move ( cstring d,
cstring a,
int  s 
)
inline

References move().

◆ move() [2/2]

void move ( T *  target,
const T *  source,
int  size 
)
inline

Copy source array of the given size to the target as fast as possible. The arrays may overlap.

Parameters
targetTarget array.
sourceSource array.
sizeSize of both arrays.

Referenced by Vector< elm::dtd::AbstractAttribute * >::insert(), move(), and Vector< elm::dtd::AbstractAttribute * >::removeAt().

◆ reverse()

void reverse ( T *  a,
int  n 
)

Reverse the elements of the given array.

Parameters
aArray to reverse.
nNumber of elements in a.

References elm::swap().

◆ set()

void set ( T *  target,
int  size,
const T &  v 
)
inline

Set the items of an array of the given size to the given value, as fast as possible.

Parameters
targetTarget array.
sizeSize of both arrays.
vValue to set.

Referenced by Array< elm::String >::fill(), and Output::print().