3 #include "g_common_def.h"
11 template <
class T>
class gstr;
16 template <
class IT1 ,
class IT2 >
inline size_t copy ( IT1 aFrom , IT1 aTo , IT2 aDestination )
20 for ( ; aFrom != aTo && aFrom.isIn(); result++ , aDestination++ , aFrom++ )
22 aDestination.underlying() = aFrom.underlying();
28 template <
class IT1 ,
class IT2 >
inline size_t copy ( IT1 aFrom , IT2 aDestination )
32 for ( ; aFrom.isIn(); result++ , aDestination++ , aFrom++ )
34 aDestination.underlying() = aFrom.underlying();
40 template <
class T ,
class IT2 >
inline size_t copy (
const T* aVectorP ,
size_t aSize , IT2 aDestination )
42 for (
int i = 0 ; i < (int)aSize ; i++ )
44 aDestination.underlying() = aVectorP[i];
50 template <
class IT1 ,
class IT2 >
inline size_t copy_reverse ( IT1 aFrom , IT1 aTo , IT2 aDestination )
54 for ( ; aFrom != aTo ; result++ , aDestination++ , aFrom-- )
56 aDestination.underlying() = aFrom.underlying();
62 template <
class T ,
class IT1 >
inline IT1 search ( IT1 aFrom , IT1 aTo , T aValue )
64 for ( ; aFrom.isIn() ; aFrom++ )
66 if ( aFrom.underlying() == aValue )
80 template <
class T ,
class IT1 >
inline IT1 search ( IT1 aFrom , T aValue )
82 for ( ; aFrom.isIn() ; aFrom++ )
84 if ( aFrom.underlying() == aValue )
93 template <
class R,
class T >
94 inline gstr<T> get_cont_string (
const R& aCont ,
const T* aSeparator = (
const T*)gstr<T>::space() )
96 typename R::ItConst_t it(aCont);
98 std::basic_stringstream<T> output;
104 for( ++it ; it.isIn() ; it++ )
106 output << aSeparator << *it;
110 return output.str().c_str();
114 template <
class T ,
class R >
inline bool try_remove ( R& aRecipient , T aItem )
116 typename R::It_t it = search( aRecipient.getIterator(head) , aRecipient.getIterator(tail) , aItem );
120 aRecipient.remove(it);
131 template <
class T ,
class R >
inline size_t remove_all ( R& aRecipient , T aItem )
133 typename R::It_t it = search( aRecipient.getIterator(head) , aItem );
138 aRecipient.remove(it);
140 it = search ( it , aItem );
Definition: g.mthread.ThreadSimpleEvent.h:5
Definition: g_cont_alg.h:11