9 #ifndef collectionFunctions_H_
10 #define collectionFunctions_H_
21 template<
typename TPtr >
24 bool operator() (
const TPtr left,
const TPtr right )
const
26 return *left < *right;
32 template <
typename ColT,
typename T>
35 std::mem_fun_t<void,T> mf = std::mem_fun(func);
36 std::for_each(col.begin(),col.end(),mf);
40 template <
typename K,
typename V>
43 std::mem_fun_t<void,V> mf = std::mem_fun(func);
44 typename std::map<K,V>::iterator iter = col.begin();
45 for(;iter != col.end();++iter)
52 template <
typename K,
typename V>
55 std::mem_fun_t<void,V> mf = std::mem_fun(func);
56 typename std::map<K,V*>::iterator iter = col.begin();
57 for(;iter != col.end();++iter)
65 template <
typename ColT,
typename T,
typename Arg>
68 std::mem_fun1_t<void,T,Arg> mf = std::mem_fun(func);
69 typename ColT::iterator iter = col.begin();
70 for(;iter != col.end();++iter)
79 template <
typename K,
typename V,
typename Arg>
82 std::mem_fun1_t<void,V,Arg> mf = std::mem_fun(func);
83 typename std::map<K,V>::iterator iter = col.begin();
84 for(;iter != col.end();++iter)
92 template <
typename K,
typename V,
typename Arg>
95 std::mem_fun1_t<void,V,Arg> mf = std::mem_fun(func);
96 typename std::map<K,V*>::iterator iter = col.begin();
97 for(;iter != col.end();++iter)
103 template <
typename T>
106 typename T::const_iterator iter = col.begin();
107 for(;iter != col.end();++iter)
114 template <
typename T>
117 typename T::const_iterator iter = col.begin();
118 for(;iter != col.end();++iter)
125 template <
typename K,
typename V>
128 typename std::map<K,V>::const_iterator iter = col.begin();
129 for(;iter != col.end();++iter)
136 template <
typename K,
typename V>
139 typename std::map<K,V>::const_iterator iter = col.begin();
140 for(;iter != col.end();++iter)
142 delete[] iter->second;
void DtDeleteArrayAndClear(T &col)
Definition: collectionFunctions.h:115
bool operator()(const TPtr left, const TPtr right) const
Definition: collectionFunctions.h:24
Sort predicate object function.
Definition: collectionFunctions.h:22
void DtCallMemberFunction(ColT &col, void(T::*func)())
For every item of type T in a collection of T, call member function.
Definition: collectionFunctions.h:33
void DtDeletePointerAndClear(T &col)
Definition: collectionFunctions.h:104