csArraySafeCopyElementHandler< T > Class Template Reference
[Containers]
Special element handler for csArray that makes sure that when the array is reallocated that the objects are properly constructed and destructed at their new position. More...
#include <csutil/array.h>
Static Public Member Functions | |
static void | MoveElements (T *mem, size_t dest, size_t src, size_t count) |
Move elements inside a region. | |
static void | MoveElementsNoOverlap (T *mem, size_t dest, size_t src, size_t count) |
template<typename Allocator > | |
static T * | ResizeRegion (Allocator &alloc, T *mem, size_t relevantcount, size_t oldcount, size_t newcount) |
Reallocate a region allocated by Allocator . |
Detailed Description
template<class T>
class csArraySafeCopyElementHandler< T >
Special element handler for csArray that makes sure that when the array is reallocated that the objects are properly constructed and destructed at their new position.
This is needed for objects that can not be safely moved around in memory (like weak references). This is of course slower and that is the reason that this is not done by default.
Definition at line 179 of file array.h.
Member Function Documentation
template<class T >
static void csArraySafeCopyElementHandler< T >::MoveElements | ( | T * | mem, | |
size_t | dest, | |||
size_t | src, | |||
size_t | count | |||
) | [inline, static] |
template<class T >
static void csArraySafeCopyElementHandler< T >::MoveElementsNoOverlap | ( | T * | mem, | |
size_t | dest, | |||
size_t | src, | |||
size_t | count | |||
) | [inline, static] |
template<class T >
template<typename Allocator >
static T* csArraySafeCopyElementHandler< T >::ResizeRegion | ( | Allocator & | alloc, | |
T * | mem, | |||
size_t | relevantcount, | |||
size_t | oldcount, | |||
size_t | newcount | |||
) | [inline, static] |
The documentation for this class was generated from the following file:
- csutil/array.h
Generated for Crystal Space 2.0 by doxygen 1.6.1