The GeometryDataManager singleton encapsulates a thread that does nothing but loads and unloads the geometry and surface data from disk when requested.
When there's nothing being or to be loaded, the thread is blocked.
#include <GeometryDataManager.h>
Classes |
|
class | Request |
Public Member Functions |
|
void | requestLoad (GeometryDataRef data, GeometryDataProcessedCallback onProcessedCallback, bool now) |
Queues the load/unload request for this
GeometryData.
|
|
void | requestUnload (GeometryDataRef data, GeometryDataProcessedCallback onProcessedCallback, bool now) |
void | requestLoad (SurfaceDataRef data, SurfaceDataProcessedCallback onProcessedCallback, bool now) |
void | requestUnload (SurfaceDataRef data, SurfaceDataProcessedCallback onProcessedCallback, bool now) |
void | start () |
void | stop () |
void | reset () |
Empties the request queue, as well as the
list of registered GeometryDataLoaders. |
|
void | addGeometryDataLoader (GeometryDataLoaderRef loader) |
Adds the given GeometryDataLoader
as one of the registered loaders. |
|
void | removeGeometryDataLoader (GeometryDataLoaderRef loader) |
Removes the given GeometryDataLoader
as one of the registered loaders. |
|
void | removeGeometryDataLoader (const awString::IString &id) |
const GeometryDataLoaderList & | getLoaders () const |
Static Public Member Functions |
|
static GeometryDataManager & | instance () |
Any GeometryData
that needs to load its heavy data can use this object to load the
data asynchroniously. |
|
static void | destruct () |
static GeometryDataManager& instance | ( | ) | [static] |
Any GeometryData that needs to load its heavy data can use this object to load the data asynchroniously.
static void destruct | ( | ) | [static] |
void requestLoad | ( | GeometryDataRef | data, |
GeometryDataProcessedCallback | onProcessedCallback, | ||
bool | now | ||
) |
Queues the load/unload request for this GeometryData.
The callback will be called with the GeometryData, and the success status, when the request has been processed.
void requestUnload | ( | GeometryDataRef | data, |
GeometryDataProcessedCallback | onProcessedCallback, | ||
bool | now | ||
) |
void requestLoad | ( | SurfaceDataRef | data, |
SurfaceDataProcessedCallback | onProcessedCallback, | ||
bool | now | ||
) |
void requestUnload | ( | SurfaceDataRef | data, |
SurfaceDataProcessedCallback | onProcessedCallback, | ||
bool | now | ||
) |
void start | ( | ) |
void stop | ( | ) |
void reset | ( | ) |
Empties the request queue, as well as the list of registered GeometryDataLoaders.
void addGeometryDataLoader | ( | GeometryDataLoaderRef | loader | ) |
Adds the given GeometryDataLoader as one of the registered loaders.
void removeGeometryDataLoader | ( | GeometryDataLoaderRef | loader | ) |
Removes the given GeometryDataLoader as one of the registered loaders.
void removeGeometryDataLoader | ( | const awString::IString & | id | ) |
const GeometryDataLoaderList& getLoaders | ( | ) | const [inline] |
{ return myLoaders; }