Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include </home/casse/otawa/elm/src/concepts.h>
Public Member Functions | |
int | length (void) |
const T & | get (int index) const |
int | indexOf (const T &value, int start=0) const |
int | lastIndexOf (const T &value, int start=-1) const |
const T & | operator[] (int index) const |
Public Member Functions inherited from elm::concept::Collection< T > | |
int | count (void) |
bool | contains (const T &item) |
bool | containsAll (const C< T > &collection) |
bool | isEmpty (void) |
operator bool (void) | |
This concept provides methods to access an indexed list of items.
T | Type of item in the array. |
const T& elm::concept::Array< T >::get | ( | int | index | ) | const |
Get an item by its index.
index | Index of the item to get. |
int elm::concept::Array< T >::indexOf | ( | const T & | value, |
int | start = 0 |
||
) | const |
Get the index of a value.
value | Value to find the index of. |
start | Index to start from. |
int elm::concept::Array< T >::lastIndexOf | ( | const T & | value, |
int | start = -1 |
||
) | const |
Get the index of the last occurence of a value.
value | Value to find the last index of. |
start | Index to start from. |
int elm::concept::Array< T >::length | ( | void | ) |
Same as Collection::count().
const T& elm::concept::Array< T >::operator[] | ( | int | index | ) | const |
Same as get().