Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include </home/casse/Dev/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 Collection< T > | |
int | count (void) |
bool | contains (const T &item) |
template<template< class _ > class C> | |
bool | containsAll (const C< T > &collection) |
bool | isEmpty (void) |
operator bool (void) | |
Iter | begin (void) const |
Iter | end (void) const |
bool | equals (const Collection &coll) |
bool | operator== (const Collection &coll) |
bool | operator!= (const Collection &coll) |
Additional Inherited Members | |
Public Types inherited from Collection< T > | |
typedef T | t |
typedef Collection< T > | self_t |
Static Public Attributes inherited from Collection< T > | |
static const Collection | null |
static const Collection< T > | null |
This concept provides methods to access an indexed list of items.
T | Type of item in the array. |
const T& get | ( | int | index | ) | const |
Get an item by its index.
index | Index of the item to get. |
int 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 lastIndexOf | ( | const T & | value, |
int | start = -1 |
||
) | const |
Get the index of the last occurrence of a value.
value | Value to find the last index of. |
start | Index to start from. |
int length | ( | void | ) |
Same as Collection::count().
const T& operator[] | ( | int | index | ) | const |
Same as get().