Lines 36-41
Link Here
|
36 |
#include "Debug.hpp" |
36 |
#include "Debug.hpp" |
37 |
#include <cstdlib> |
37 |
#include <cstdlib> |
38 |
#include <iostream> |
38 |
#include <iostream> |
|
|
39 |
#include <boost/mpl/for_each.hpp> |
39 |
|
40 |
|
40 |
////////////////////////////////////////////////////////////////////////////// |
41 |
////////////////////////////////////////////////////////////////////////////// |
41 |
// Namespace |
42 |
// Namespace |
Lines 57-69
Link Here
|
57 |
* \brief Apply function f to all elements in Object o |
58 |
* \brief Apply function f to all elements in Object o |
58 |
* \param object The object to apply functor to |
59 |
* \param object The object to apply functor to |
59 |
* \param functor The function that modifies each object |
60 |
* \param functor The function that modifies each object |
60 |
* \return result of std::for_each (unary_function) |
61 |
* \return result of for_each (unary_function) |
61 |
* |
62 |
* |
62 |
* This is essentially a short cut for std::for_each |
63 |
* This is essentially a short cut for std::for_each |
63 |
**/ |
64 |
**/ |
64 |
template<class Object, class Functor> |
65 |
template<class Object, class Functor> |
65 |
inline Functor for_all(Object & object, Functor functor) { |
66 |
inline Functor for_all(Object & object, Functor functor) { |
66 |
return std::for_each(object.begin(), object.end(), functor); |
67 |
return for_each(object.begin(), object.end(), functor); |
67 |
} |
68 |
} |
68 |
|
69 |
|
69 |
/** |
70 |
/** |