Thread portable class


Gate portable class


Timer class


Pool class


Terimber 2.0


About C++


Downloads Products & Services Support Clients Open Source About



Home / Open source / Terimber 2.0

algorithm Namespace Reference

supports thread safe STL algorithms More...


Functions

template<class Cont, class Pred>
void find_if (Cont &cont, Pred &pr, const mutex &mtx)
 find_if thread safe method
template<class Cont, class Pred>
void for_each (Cont &cont, Pred &pr, const mutex &mtx)
 for_each thread safe method
template<class Cont, class Pred>
void remove_if (Cont &cont, Pred &pr, const mutex &mtx)
 remove_if thread safe method
template<class Al, class Obj, class Cont>
void push_back (Al &al, Cont &cont, Obj &obj, const mutex &mtx)
 push_back with external allocator thread safe method
template<class Al, class Cont, class Pred, class Obj>
bool push_back_if (Al &al, Cont &cont, Pred &pr, Obj &obj, const mutex &mtx)
 push_back_if with external allocator and predicate thread safe method
template<class Obj, class Cont>
void push_back (Cont &cont, Obj &obj, const mutex &mtx)
 push_back thread safe method
template<class Cont, class Pred, class Obj>
bool push_back_if (Cont &cont, Pred &pr, Obj &obj, const mutex &mtx)
 push_back_if with predicate thread safe method
template<class Obj, class Cont>
void remove (Cont &cont, Obj &obj, const mutex &mtx)
 remove thread safe method
template<class Obj>
void swap (Obj &first, Obj &second)
 swaps method


Detailed Description

supports thread safe STL algorithms

Function Documentation

template<class Cont, class Pred>
void algorithm::find_if ( Cont &  cont,
Pred &  pr,
const mutex mtx 
) [inline]

find_if thread safe method

Parameters:
cont  input container
pr  predicate
mtx  mutex

Definition at line 40 of file algorith.hpp.

References TYPENAME.

template<class Cont, class Pred>
void algorithm::for_each ( Cont &  cont,
Pred &  pr,
const mutex mtx 
) [inline]

for_each thread safe method

Parameters:
cont  input container
pr  predicate
mtx  mutex

Definition at line 50 of file algorith.hpp.

References TYPENAME.

Referenced by dbserver_impl::_notify_async().

template<class Obj, class Cont>
void algorithm::push_back ( Cont &  cont,
Obj &  obj,
const mutex mtx 
) [inline]

push_back thread safe method

Parameters:
cont  input container
obj  object
mtx  mutex

Definition at line 95 of file algorith.hpp.

template<class Al, class Obj, class Cont>
void algorithm::push_back ( Al &  al,
Cont &  cont,
Obj &  obj,
const mutex mtx 
) [inline]

push_back with external allocator thread safe method

Parameters:
al  external allocator
cont  input container
obj  object
mtx  mutex

Definition at line 74 of file algorith.hpp.

template<class Cont, class Pred, class Obj>
bool algorithm::push_back_if ( Cont &  cont,
Pred &  pr,
Obj &  obj,
const mutex mtx 
) [inline]

push_back_if with predicate thread safe method

Parameters:
cont  input container
pr  predicate
obj  object
mtx  mutex

Definition at line 102 of file algorith.hpp.

References TYPENAME.

template<class Al, class Cont, class Pred, class Obj>
bool algorithm::push_back_if ( Al &  al,
Cont &  cont,
Pred &  pr,
Obj &  obj,
const mutex mtx 
) [inline]

push_back_if with external allocator and predicate thread safe method

Parameters:
al  external allocator
cont  input container
pr  predicate
obj  object
mtx  mutex

Definition at line 81 of file algorith.hpp.

References TYPENAME.

Referenced by dbserver_impl::set_callback().

template<class Obj, class Cont>
void algorithm::remove ( Cont &  cont,
Obj &  obj,
const mutex mtx 
) [inline]

remove thread safe method

Parameters:
cont  input container
obj  object
mtx  mutex

Definition at line 116 of file algorith.hpp.

template<class Cont, class Pred>
void algorithm::remove_if ( Cont &  cont,
Pred &  pr,
const mutex mtx 
) [inline]

remove_if thread safe method

Parameters:
cont  input container
pr  predicate
mtx  mutex

Definition at line 60 of file algorith.hpp.

References TYPENAME.

Referenced by dbserver_impl::remove_callback().

template<class Obj>
void algorithm::swap ( Obj &  first,
Obj &  second 
) [inline]

swaps method

Parameters:
first  first object
second  second object

Definition at line 123 of file algorith.hpp.



© Copyright Terimber 2003-.