3DCoat  3D-COAT 4.9.xx
3DCoat is the one application that has all the tools you need to take your 3D idea from a block of digital clay all the way to a production ready, fully textured organic or hard surface model.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cList< TYPE, CONTAINER > Class Template Reference

The array template, refer it as coat::list <...> if you are using the Core API. More...

#include <cList.h>

Public Member Functions

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...
 

Detailed Description

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
TYPEthe type of elements
CONTAINERthe container type, use the default one

Member Function Documentation

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: