#include <global.h>
List of all members.
Public Member Functions |
| | GlobalMemory () |
| LWMemChunk | create (const char *ID, int size) |
| template<class T > |
| T * | Create (const char *ID) |
| LWMemChunk | find (const char *ID) |
| template<class T > |
| T * | Find (const char *ID) |
| LWMemChunk | first (void) |
| template<class T > |
| bool | Get (const char *ID, T *&type, T &defaultVal) |
| | Find and return a named chukc of memory, or create a new one if it doesn't exist.
|
| const char * | ID (LWMemChunk chunk) |
| LWMemChunk | next (LWMemChunk chunk) |
| int | size (LWMemChunk chunk) |
Protected Member Functions |
| bool | _acquireGlobal () |
| virtual bool | available () const |
| | Check if the global is available.
|
| virtual LWGlobalPool * | getGlobal () |
| | Get the pointer to the global.
|
| LWGlobalPool * | operator-> () |
| | Get the pointer to the global.
|
Static Protected Attributes |
| static LWGlobalPool * | globPtr |
| | Pointer to the global functions.
|
Constructor & Destructor Documentation
| lwpp::GlobalMemory::GlobalMemory |
( |
| ) |
|
|
inline |
Member Function Documentation
Check if the global is available.
| LWMemChunk lwpp::GlobalMemory::create |
( |
const char * |
ID, |
|
|
int |
size |
|
) |
| |
|
inline |
template<class T >
| T* lwpp::GlobalMemory::Create |
( |
const char * |
ID | ) |
|
|
inline |
| LWMemChunk lwpp::GlobalMemory::find |
( |
const char * |
ID | ) |
|
|
inline |
template<class T >
| T* lwpp::GlobalMemory::Find |
( |
const char * |
ID | ) |
|
|
inline |
| LWMemChunk lwpp::GlobalMemory::first |
( |
void |
| ) |
|
|
inline |
template<class T >
| bool lwpp::GlobalMemory::Get |
( |
const char * |
ID, |
|
|
T *& |
type, |
|
|
T & |
defaultVal |
|
) |
| |
|
inline |
Find and return a named chukc of memory, or create a new one if it doesn't exist.
- Returns:
- true if the memory chunk existed already
@param ID ID of the memory block
@param type Point to a block of type T, this will contain the found memory block
@param defaultVal Default value for situations where there is no memory block (i.e. Modeler)
@return true of a block could be found or the defaults are being used
Get the pointer to the global.
| const char* lwpp::GlobalMemory::ID |
( |
LWMemChunk |
chunk | ) |
|
|
inline |
| LWMemChunk lwpp::GlobalMemory::next |
( |
LWMemChunk |
chunk | ) |
|
|
inline |
Get the pointer to the global.
| int lwpp::GlobalMemory::size |
( |
LWMemChunk |
chunk | ) |
|
|
inline |
Member Data Documentation
Pointer to the global functions.
The documentation for this class was generated from the following file: