![]() |
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/data/Slice.h>
Classes | |
class | BaseIter |
class | Iter |
class | MutIter |
Public Types | |
typedef Slice< C > | self_t |
typedef C::t | t |
Public Member Functions | |
Slice () | |
Slice (C &array, int first, int count) | |
C & | array () const |
int | firstIndex () const |
int | lastIndex () const |
int | count () const |
const t & | get (int i) const |
const t & | operator[] (int i) const |
t & | get (int i) |
t & | operator[] (int i) |
int | length () const |
int | indexOf (const t &x, int i=0) const |
int | lastIndexOf (const t &x, int i=-1) const |
Iter | begin () const |
Iter | end () const |
bool | contains (const t &x) const |
bool | containsAll (const self_t &s) const |
bool | isEmpty () const |
operator bool () const | |
bool | equals (const self_t &s) const |
bool | operator== (const self_t &s) const |
bool | operator!= (const self_t &s) const |
MutIter | begin () |
MutIter | end () |
This class implement a light-weight array collection representing a slice of another array collection.
Slice implements the following concepts:
T | Type of elements in the slice. |
D | Type of the array data structure. |
typedef C::t t |
|
inline |
|
inline |
|
inline |
Get the parent array.
|
inline |
|
inline |
References Slice< C >::indexOf().
Referenced by Slice< C >::containsAll().
References Slice< C >::contains().
|
inline |
Referenced by Slice< C >::length().
|
inline |
|
inline |
References Slice< C >::get().
Referenced by Slice< C >::operator!=(), and Slice< C >::operator==().
|
inline |
Get the index, in the parent array, of the first element of the slice.
|
inline |
|
inline |
Referenced by Slice< C >::equals(), Slice< C >::indexOf(), Slice< C >::lastIndexOf(), and Slice< C >::operator[]().
|
inline |
References Slice< C >::get().
Referenced by Slice< C >::contains().
|
inline |
Referenced by Slice< C >::operator bool().
|
inline |
Get the index, in the parent array, of the last element of the slice.
|
inline |
References Slice< C >::get().
|
inline |
References Slice< C >::count().
|
inline |
References Slice< C >::isEmpty().
References Slice< C >::equals().
References Slice< C >::equals().
|
inline |
References Slice< C >::get().
|
inline |
References Slice< C >::get().