#include <qgarlib/stl.H>
This struct is designed to clone objects, handled by a pointer, through STL algorithms. Below is a typical use of this struct:
#include <list> #include <algorithm> #include <qgarlib/Object.H> #include <qgarlib/stl.H> list<Object*> myList; list<Object*> myCopyList; ... // Make a copy of the list transform(myList.begin(), myList.end(), back_inserter(myCopyList), qstlCloneObject());
For further information, see [Meyer, 2001].
Definition at line 140 of file stl.H.
Public Member Functions | |
| template<typename T> | |
| T * | operator() (const T *t) const |
| Duplicates a passed object using its copy constructor. | |
|
||||||||||
|
Duplicates a passed object using its copy constructor.
|