Go to the source code of this file.
Macros | |
#define | CHECKALLOC(x) if(!x) return false; |
#define | DELETEARRAY(x) if (x) { delete []x; x = null; } |
Deletes an array. More... | |
#define | DELETESINGLE(x) if (x) { delete x; x = null; } |
Deletes an instance of a class. More... | |
#define | SAFE_ALLOC(ptr, type, count) DELETEARRAY(ptr); ptr = new type[count]; CHECKALLOC(ptr); |
Standard allocation cycle. More... | |
#define | SAFE_DESTRUCT(x) if (x) { (x)->SelfDestruct(); (x) = null; } |
Safe ICE-style release. More... | |
#define | SAFE_RELEASE(x) if (x) { (x)->Release(); (x) = null; } |
Safe D3D-style release. More... | |
#define | SIZEOFOBJECT sizeof(*this) |
Gives the size of current object. Avoid some mistakes (e.g. "sizeof(this)"). More... | |
Functions | |
inline_ void | CopyMemory (void *dest, const void *src, udword size) |
inline_ void | FillMemory (void *dest, udword size, ubyte val) |
inline_ void | MoveMemory (void *dest, const void *src, udword size) |
inline_ void | StoreDwords (udword *dest, udword nb, udword value) |
inline_ void | ZeroMemory (void *addr, udword size) |
#define CHECKALLOC | ( | x | ) | if(!x) return false; |
Definition at line 103 of file IceMemoryMacros.h.
#define DELETEARRAY | ( | x | ) | if (x) { delete []x; x = null; } |
Deletes an array.
Definition at line 96 of file IceMemoryMacros.h.
#define DELETESINGLE | ( | x | ) | if (x) { delete x; x = null; } |
Deletes an instance of a class.
Definition at line 95 of file IceMemoryMacros.h.
#define SAFE_ALLOC | ( | ptr, | |
type, | |||
count | |||
) | DELETEARRAY(ptr); ptr = new type[count]; CHECKALLOC(ptr); |
Standard allocation cycle.
Definition at line 107 of file IceMemoryMacros.h.
#define SAFE_DESTRUCT | ( | x | ) | if (x) { (x)->SelfDestruct(); (x) = null; } |
Safe ICE-style release.
Definition at line 98 of file IceMemoryMacros.h.
#define SAFE_RELEASE | ( | x | ) | if (x) { (x)->Release(); (x) = null; } |
Safe D3D-style release.
Definition at line 97 of file IceMemoryMacros.h.
#define SIZEOFOBJECT sizeof(*this) |
Gives the size of current object. Avoid some mistakes (e.g. "sizeof(this)").
Definition at line 93 of file IceMemoryMacros.h.
Copies a buffer.
addr | [in] destination buffer address |
addr | [in] source buffer address |
size | [in] buffer length |
Definition at line 81 of file IceMemoryMacros.h.
Fills a buffer with a given byte.
addr | [in] buffer address |
size | [in] buffer length |
val | [in] the byte value |
Definition at line 37 of file IceMemoryMacros.h.
Moves a buffer.
addr | [in] destination buffer address |
addr | [in] source buffer address |
size | [in] buffer length |
Definition at line 91 of file IceMemoryMacros.h.
Fills a buffer with a given dword.
addr | [in] buffer address |
nb | [in] number of dwords to write |
value | [in] the dword value |
Definition at line 48 of file IceMemoryMacros.h.
Clears a buffer.
addr | [in] buffer address |
size | [in] buffer length |
Definition at line 27 of file IceMemoryMacros.h.