DDD_DataDirector. Main interface to DataDirector core that encapsulates all Assets, Connections and core logic.
More...
#include <DDD_DataDirector.h>
|
static const char * | Version () |
|
static void | LogDebug (const char *format,...) |
|
static void | LogInfo (const char *format,...) |
|
static void | LogWarning (const char *format,...) |
|
static void | LogError (const char *format,...) |
|
DDD_DataDirector. Main interface to DataDirector core that encapsulates all Assets, Connections and core logic.
DDD_AssetBase* AddAsset |
( |
const std::string & |
instanceName, |
|
|
const std::string & |
className, |
|
|
const std::string & |
libName, |
|
|
const DDD_AttributeList & |
params |
|
) |
| |
|
virtual |
Instantiate an asset and add it to the asset list
- Parameters
-
instanceName | The intance name of the new asset |
className | The class name of the new asset |
libName | The library file name of the new asset |
params | A list of initialization parameters for the asset |
- Returns
- A pointer to the newly added asset or NULL on failure
Implements XMLConfigTarget.
Add a Connection to the connection list
- Parameters
-
connection | A connection to add to the connection list |
Implements XMLConfigTarget.
Add a new event subscriber to subscriber list
- Parameters
-
subscriber | The event subscriber to add |
Implements DDD_AssetContainer.
bool ChangeAssetInstanceName |
( |
const std::string & |
oldAssetName, |
|
|
const std::string & |
newAssetName |
|
) |
| |
Changes asset instance name and also checks connections to make sure any connections that referenced the asset are updated
- Parameters
-
oldAssetName | The old instance name of the asset |
newAssetName | The new instance name of the asset |
- Returns
- true If an asset with the old name was found and if the new name is legal
Clears all Assets and Connections- revert to empty configuration
- Returns
- Returns true if there are no assets or connections in the director
Searches the asset list for an asset with the specified instance name
- Parameters
-
assetName | The instance name of the asset to find |
- Returns
- Returns a pointer to the asset or NULL if not found
Implements DDD_AssetContainer.
Searches all instantiated assets for the attribute
- Parameters
-
name | The fully qualified name of the attribute to find (e.g. assetName.attribName) |
- Returns
- Returns a pointer to the attribute or NULL if not found
Implements DDD_AssetContainer.
void ForceProcessConnections |
( |
| ) |
|
This method will force every connection to be added to pending connections to be processed regardless whether they had any changed attributes.
bool LoadXML |
( |
const std::string & |
filename | ) |
|
Load the Data Director state from an XML configuration file
- Parameters
-
filename | The name of the configuration file to load |
- Returns
- Returns True if the configuration was successfully loaded
Moves a asset "DOWN" in the list, which means it gets moved towards the beginning of the list.
- Parameters
-
asset | The asset to reorder |
- Returns
- True if if the asset was moved, false otherwise
Moves a asset "UP" in the list, which means it gets moved further towards the end of the list.
- Parameters
-
asset | The asset to reorder |
- Returns
- True if if the asset was moved, false otherwise
Moves a connection "DOWN" in the list, which means it gets moved towards the beginning of the list.
- Parameters
-
connection | The connection to reorder |
- Returns
- True if if the connection was moved, false otherwise
Moves a connection "UP" in the list, which means it gets moved further towards the end of the list.
- Parameters
-
connection | The connection to reorder |
- Returns
- True if if the connection was moved, false otherwise
Post a new event that will be received by all event subscribers
- Parameters
-
event | The object event to post |
Implements DDD_AssetContainer.
Runs the Data Director engine–iterates the assets and pumps connections
void Process |
( |
double |
time | ) |
|
Runs the Data Director engine–iterates the assets and pumps connections
- Parameters
-
time | Elapsed time since last call (for when calling process inside of calculate) |
void RegisterAssetCreateCallback |
( |
std::string |
className, |
|
|
AssetCreateCallback |
assetCreatorCb, |
|
|
void * |
data |
|
) |
| |
Registers an asset creation callback for "special" assets (i.e.- RSOs) This callback will be called whenever a new asset is instantiated by the director
- Parameters
-
assetCreatorCb | Function pointer to the callback |
data | Data to pass to callback |
Remove asset from asset list and also check each connection and invalidates ones that referenced that Asset
- Parameters
-
asset | A pointer to the asset to remove |
Removes a connection from the Director
- Parameters
-
connection | The connection to remove |
Remove an event subscriber from the subscriber list
- Parameters
-
subscriber | The event subscriber to remove |
Implements DDD_AssetContainer.
bool SaveXML |
( |
const std::string & |
filename | ) |
|
Save the Data Director state to an XML configuration file
- Parameters
-
filename | The name of the configuration file to save to |
- Returns
- Returns True if the configuration was successfully saved
static const char* Version |
( |
| ) |
|
|
static |
- Returns
- Returns version string for compatibility checking of plugins
The documentation for this class was generated from the following file: