9 #ifndef metaprogramming_H 10 #define metaprogramming_H 24 namespace metaprogramming
39 for_each(container.begin(),container.end(),
ObjectDelete());
48 if (ptr) ptr->clear();
77 template <
typename TARGET_TYPE>
81 return TARGET_TYPE(val);
99 ptr.first.make_unique();
100 ptr.second.make_unique();
119 template<
typename it_src,
typename it_dst>
122 for (it_src i=first; i!=last ; ++i,++target)
123 *target = static_cast<typename it_dst::value_type>(*i);
136 template<
typename src_container,
typename dst_container>
139 trg.resize( src.size() );
143 for ( ; i!=last ; ++i,++target)
144 *target = static_cast<typename dst_container::value_type>(*i);
164 return *(*baseIterator);
210 inline bool operator<(const MemoryBypasserIterator<T,U> &i)
const {
211 return baseIterator<i.baseIterator;
235 typedef T (V::*MemberFunction)(U1,U2);
244 return (obj.*func)(p1,p2);
253 typedef T (V::*MemberFunction)(U);
261 return (obj.*func)(p);
270 typedef T (V::*MemberFunction)(void);
276 return (obj.*func)();
297 typename Op::first_argument_type &
val;
316 typename Op::second_argument_type &
val;
NonConstBind2nd< Op > nonConstBind2nd(Op &o, typename Op::second_argument_type &t)
Do not directly use the NonConstBind2nd class directly.
class BASE_IMPEXP CStream
EIGEN_STRONG_INLINE const AdjointReturnType t() const
Transpose.
const Scalar * const_iterator
NonConstBind1st< Op > nonConstBind1st(Op &o, typename Op::first_argument_type &t)
Use this function instead of directly calling NonConstBind1st.
void DeleteContainer(T &container)
A function which deletes a container of pointers.
A smart pointer to a CObject object.
BinaryMemberFunctionWrapper< T, U1, U2, V > wrapMember(V &obj, T(V::*fun)(U1, U2))
This function creates a function from an object and a member function.
MemoryBypasserIterator< T, U > bypassPointer(const T &baseIterator)
Sintactic sugar for MemoryBypasserIterator.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void copy_typecasting(it_src first, it_src last, it_dst target)
Behaves like std::copy but allows the source and target iterators to be of different types through st...
void copy_container_typecasting(const src_container &src, dst_container &trg)
Copy all the elements in a container (vector, deque, list) into a different one performing the approp...