The array template, refer it as coat::list <...> if you are using the Core API.
More...
#include <cList.h>
|
TYPE | uGet (const int Index, const TYPE &defvalue) |
| Unlimited get - get value at index Index, if beyoud range - return defvalue. More...
|
|
void | uSet (const int Index, const TYPE &value, const TYPE &defvalue) |
| Unlimited set - set value at index Index, if beyoud range - add correcsponding count of defvalue-s. More...
|
|
bool | some (::std::function< bool(const TYPE &)>) const |
| js - like functions More...
|
|
bool | every (::std::function< bool(const TYPE &)>) const |
| every returns true if all callbacks returned true More...
|
|
int | find (::std::function< bool(const TYPE &)>) const |
| find returns index of the element if some of callbacks returns true or returns -1 More...
|
|
void | forEach (::std::function< void(const TYPE &)>) const |
| execute callback for each element More...
|
|
void | filter (cList< TYPE, CONTAINER > &result,::std::function< bool(const TYPE &)>) const |
| filter returns new array with elements that passed the check More...
|
|
template<class RES > |
void | reduce (RES &res,::std::function< void(RES &, const TYPE &)> fn) const |
| reduce - sort of summ of all elements More...
|
|
template<class TYPE, class CONTAINER = cList_Container<TYPE>>
class cList< TYPE, CONTAINER >
The array template, refer it as coat::list <...> if you are using the Core API.
- Template Parameters
-
TYPE | the type of elements |
CONTAINER | the container type, use the default one |
template<class TYPE, class CONTAINER >
bool cList< TYPE, CONTAINER >::every |
( |
::std::function< bool(const TYPE &)> |
fn | ) |
const |
|
inline |
every returns true if all callbacks returned true
template<class TYPE, class CONTAINER>
void cList< TYPE, CONTAINER >::filter |
( |
cList< TYPE, CONTAINER > & |
result, |
|
|
::std::function< bool(const TYPE &)> |
fn |
|
) |
| const |
|
inline |
filter returns new array with elements that passed the check
template<class TYPE, class CONTAINER >
int cList< TYPE, CONTAINER >::find |
( |
::std::function< bool(const TYPE &)> |
fn | ) |
const |
|
inline |
find returns index of the element if some of callbacks returns true or returns -1
template<class TYPE, class CONTAINER >
void cList< TYPE, CONTAINER >::forEach |
( |
::std::function< void(const TYPE &)> |
fn | ) |
const |
|
inline |
execute callback for each element
template<class TYPE, class CONTAINER >
template<class RES >
void cList< TYPE, CONTAINER >::reduce |
( |
RES & |
res, |
|
|
::std::function< void(RES &, const TYPE &)> |
fn |
|
) |
| const |
|
inline |
reduce - sort of summ of all elements
template<class TYPE, class CONTAINER >
bool cList< TYPE, CONTAINER >::some |
( |
::std::function< bool(const TYPE &)> |
fn | ) |
const |
|
inline |
js - like functions
some returns true if some of callbacks returns true
template<class TYPE, class CONTAINER >
TYPE cList< TYPE, CONTAINER >::uGet |
( |
const int |
Index, |
|
|
const TYPE & |
defvalue |
|
) |
| |
Unlimited get - get value at index Index, if beyoud range - return defvalue.
template<class TYPE, class CONTAINER >
void cList< TYPE, CONTAINER >::uSet |
( |
const int |
Index, |
|
|
const TYPE & |
value, |
|
|
const TYPE & |
defvalue |
|
) |
| |
Unlimited set - set value at index Index, if beyoud range - add correcsponding count of defvalue-s.
The documentation for this class was generated from the following file:
- 3d-coat/3D-CoatV4/comms-Math/cList.h