Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
stl_adds.h File Reference
#include <list>
#include <string>
#include <algorithm>
#include <vector>
#include <functional>
Include dependency graph for stl_adds.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  join< T >
 

Namespaces

 std
 contains some additions to the standard template library
 

Macros

#define FOREACH(colltype, coll, it)   for( colltype::iterator it = (coll).begin(), __end=(coll).end(); it!= __end; ++it)
 
#define FOREACHI(colltype, coll, it, index)   int index=0; for( colltype::iterator it = (coll).begin(), __end=(coll).end(); it!= __end; ++it, ++index)
 
#define FOREACHIa(coll, it, index)   int index=0; for( auto it = (coll).begin(), __end=(coll).end(); it!= __end; ++it, ++index)
 
#define FOREACHC(colltype, coll, it)   for( colltype::const_iterator it = (coll).begin(), __end=(coll).end(); it!= __end ; ++it )
 
#define FOREACHCI(colltype, coll, it, index)   int index=0;for( colltype::const_iterator it = (coll).begin(), __end=(coll).end(); it!= __end; ++it, ++index)
 
#define FOREACH2(coll1, coll2, it1, it2)   for( auto it1 = (coll1).begin(), __end1=(coll1).end(), it2 = (coll2).begin(), __end2=(coll2).end(); it1!= __end1 && it2!= __end2; ++it1 , ++it2)
 

Functions

template<typename T >
abs (T v)
 absolute function for all types More...
 
template<class T , class A >
list< T, A > & operator+= (list< T, A > &l1, const list< T, A > &l2)
 += operators for list (list concat) More...
 
template<class T , class A >
list< T, A > & operator+= (list< T, A > &l1, const T &v)
 += operators for list (append) More...
 
template<class T , class A >
list< T, A > operator+ (const list< T, A > &l1, const list< T, A > &l2)
 
string itos (int i)
 integer to string with default formating More...
 
string itos (int i, const char *)
 integer to string with printf formating string More...
 
string ftos (double i)
 integer to string with default formating More...
 
string ftos (double i, const char *)
 integer to string with printf formating string More...
 
template<typename Col , typename T >
bool removeElement (Col &col, const T &elem)
 
template<typename A , typename E >
reduceList (std::list< E > list, A acc, std::function< A(A, E)> f)
 
template<typename O , typename I >
std::list< O > mapList (const std::list< I > &l, std::function< O(const I &)> fun)
 

Macro Definition Documentation

#define FOREACH (   colltype,
  coll,
  it 
)    for( colltype::iterator it = (coll).begin(), __end=(coll).end(); it!= __end; ++it)
#define FOREACH2 (   coll1,
  coll2,
  it1,
  it2 
)    for( auto it1 = (coll1).begin(), __end1=(coll1).end(), it2 = (coll2).begin(), __end2=(coll2).end(); it1!= __end1 && it2!= __end2; ++it1 , ++it2)
#define FOREACHC (   colltype,
  coll,
  it 
)    for( colltype::const_iterator it = (coll).begin(), __end=(coll).end(); it!= __end ; ++it )
#define FOREACHCI (   colltype,
  coll,
  it,
  index 
)    int index=0;for( colltype::const_iterator it = (coll).begin(), __end=(coll).end(); it!= __end; ++it, ++index)
#define FOREACHI (   colltype,
  coll,
  it,
  index 
)    int index=0; for( colltype::iterator it = (coll).begin(), __end=(coll).end(); it!= __end; ++it, ++index)
#define FOREACHIa (   coll,
  it,
  index 
)    int index=0; for( auto it = (coll).begin(), __end=(coll).end(); it!= __end; ++it, ++index)