MemeoryManager namespace was particular desinged for safe memory allocation and destruction. More...
Functions | |
template<typename T > | |
void | deleteMemory (T *&Buffer) |
Deletes the specified memory buffer savely. This function don't. | |
template<typename T > | |
void | deleteBuffer (T *&Buffer) |
Deletes the specified memory buffer (array) savely. | |
template<typename T > | |
T * | createMemory (const io::stringc &Description="Unknown") throw (std::bad_alloc) |
Allocates a new memory buffer and prints an error message if not enough memory is available. | |
template<typename T > | |
T * | createBuffer (const s32 Count, const io::stringc &Description="Unknown") throw (std::bad_alloc) |
Allocates a new memory buffer (array) and prints an error message if not enough memory is available. | |
template<class T , template< class TL, class Allocator=std::allocator< TL > > class L> | |
bool | removeElement (L< T * > &List, T *&Object, bool DeleteMemory=false, bool UniqueObject=true) |
template<class T > | |
bool | removeElement (std::vector< T * > &List, T *&Object, bool DeleteMemory=false, bool UniqueObject=true) |
template<class T > | |
bool | removeElement (std::list< T * > &List, T *&Object, bool DeleteMemory=false, bool UniqueObject=true) |
template<class T > | |
T | getElement (std::list< T > &List, u32 Index) |
template<class T > | |
const T | getElement (const std::list< T > &List, u32 Index) |
template<class T , template< class TL, class Allocator=std::allocator< TL > > class L> | |
bool | hasElement (const L< T > &List, const T &Object) |
template<class T > | |
bool | hasElement (const std::vector< T > &List, const T &Object) |
template<class T > | |
bool | hasElement (const std::list< T > &List, const T &Object) |
template<class T , template< class TL, class Allocator=std::allocator< TL > > class L> | |
void | deleteList (L< T * > &List) |
template<class T > | |
void | deleteList (std::vector< T * > &List) |
template<class T > | |
void | deleteList (std::list< T * > &List) |
MemeoryManager namespace was particular desinged for safe memory allocation and destruction.
T* sp::MemoryManager::createBuffer | ( | const s32 | Count, | |
const io::stringc & | Description = "Unknown" | |||
) | throw (std::bad_alloc) |
Allocates a new memory buffer (array) and prints an error message if not enough memory is available.
T* sp::MemoryManager::createMemory | ( | const io::stringc & | Description = "Unknown" |
) | throw (std::bad_alloc) |
Allocates a new memory buffer and prints an error message if not enough memory is available.
void sp::MemoryManager::deleteBuffer | ( | T *& | Buffer | ) |
Deletes the specified memory buffer (array) savely.
void sp::MemoryManager::deleteList | ( | std::list< T * > & | List | ) |
void sp::MemoryManager::deleteList | ( | L< T * > & | List | ) |
Deletes all elements of a list.
List,: | Specifies the list (std::list or std::vector) from which each elements are to be deleted. |
void sp::MemoryManager::deleteList | ( | std::vector< T * > & | List | ) |
void sp::MemoryManager::deleteMemory | ( | T *& | Buffer | ) |
Deletes the specified memory buffer savely. This function don't.
T sp::MemoryManager::getElement | ( | std::list< T > & | List, | |
u32 | Index | |||
) |
const T sp::MemoryManager::getElement | ( | const std::list< T > & | List, | |
u32 | Index | |||
) |
bool sp::MemoryManager::hasElement | ( | const L< T > & | List, | |
const T & | Object | |||
) |
bool sp::MemoryManager::hasElement | ( | const std::list< T > & | List, | |
const T & | Object | |||
) |
bool sp::MemoryManager::hasElement | ( | const std::vector< T > & | List, | |
const T & | Object | |||
) |
bool sp::MemoryManager::removeElement | ( | L< T * > & | List, | |
T *& | Object, | |||
bool | DeleteMemory = false , |
|||
bool | UniqueObject = true | |||
) |
Removes an element from the list.
[in,out] | List | Specifies the list (std::list or std::vector) from which the element is to be removed. |
[in,out] | Object | Specifies the object (or rather element) which is to be removed. |
[in] | DeleteMemory | Specifies whether the object is to be deleted or not. |
[in] | UniqueObject | Specifies whether several objects can be removed or only one. |
bool sp::MemoryManager::removeElement | ( | std::list< T * > & | List, | |
T *& | Object, | |||
bool | DeleteMemory = false , |
|||
bool | UniqueObject = true | |||
) |
bool sp::MemoryManager::removeElement | ( | std::vector< T * > & | List, | |
T *& | Object, | |||
bool | DeleteMemory = false , |
|||
bool | UniqueObject = true | |||
) |