#include <Interfaces.h>
Inherits DigitalSpaces::DIObjectBase.
This is the central part of Digital Spaces. The Core is responsible for parsing the .space file, selecting which components to load to fullfill the .space requirements, passing configuration data to the components, calling the components PerformPrivateStartupStep, PerformPublicStartupStep, PerformHeartbeat and Shutdown functions. It also schedules and prioritizes the calls to each of the components.
Public Member Functions | |
| void | SetSpaceFile (const char *pFullPath) |
| Sets the .space file to be loaded next time the Core is cycled (next time a component returns false from PerformHeartbeat). | |
| void | SetTimeoutEvent (const char *pszEventName, float fTimeout, DIEventSubscriber1 *pEventSubscriber) |
| Create a callback event that will be called after a period of time. | |
| void | RemoveTimeoutEvent (const char *pszEventName) |
| Remove a callback event that was previously requested. | |
| float | GetTime () |
| Returns the internal time as calculated by the Core. | |
| unsigned long | GetTimeInMS () |
| Returns the real time taken since the Core started the PerformHeartbeat state. | |
Path Related Functions. | |
These functions are used to get the assorted paths the DSS system uses.
This was previously required because each component had to do its own file accessing. It should be less needed in more recent builds, due to the addition of the ResourceManager and it's path search mechanism, but the functions remain. The paths provided from these functions can be used with the ResourceManager to cause it to do an absolute file open, without doing the search path process. | |
| const char * | GetConfigurationPath () |
| Returns the path where DSS stores it's configuration files. | |
| const char * | GetPluginPath () |
| Returns the path where DSS loads add-on DLL files from. | |
| const char * | GetModulePath () |
| Returns the path where DSS loads component DLL files from. | |
| const char * | GetSpaceFile () |
| Returns the path of the currently executing .space file. | |
| const char * | GetSpaceBasePath () |
| Returns the path to the folder the currently executing .space file is stored in. | |
OS PATH Environment Variable Functions | |
Provide these as a helper for the plugins.
Component creators should be aware that the Core automatically adds a (ModulePath)\(NameOfModule)\ directory to the search path when loading a component. Previously, components had to use these functions to do this, but it occured often enough and was helpful enough to make standard. | |
| void | AddToPathVariable (const char *pDirectory) |
| Appends the specified directory to the PATH enviroment variable. | |
| void | ResetPathVariable () |
| Undoes the effect of the last AddToPathVariable call. | |
| void DigitalSpaces::DICore1::SetSpaceFile | ( | const char * | pFullPath | ) |
Sets the .space file to be loaded next time the Core is cycled (next time a component returns false from PerformHeartbeat).
| const char* DigitalSpaces::DICore1::GetConfigurationPath | ( | ) |
Returns the path where DSS stores it's configuration files.
In a default install (on Windows) this is C:\Program Files\Digital Spaces\config
| const char* DigitalSpaces::DICore1::GetPluginPath | ( | ) |
Returns the path where DSS loads add-on DLL files from.
In a default install (on Windows) this is C:\Program Files\Digital Spaces\modules
| const char* DigitalSpaces::DICore1::GetModulePath | ( | ) |
Returns the path where DSS loads component DLL files from.
In a default install (on Windows) this is C:\Program Files\Digital Spaces\modules . This is used by copmponents who store additional files in their own subfolder in the Module Path. An example of this is GUI_CEGUI.
| const char* DigitalSpaces::DICore1::GetSpaceFile | ( | ) |
Returns the path of the currently executing .space file.
| const char* DigitalSpaces::DICore1::GetSpaceBasePath | ( | ) |
Returns the path to the folder the currently executing .space file is stored in.
This is used by some components to parse relative paths into absolute paths?
| void DigitalSpaces::DICore1::AddToPathVariable | ( | const char * | pDirectory | ) |
Appends the specified directory to the PATH enviroment variable.
Useful for components that want to load DLLs.
| void DigitalSpaces::DICore1::ResetPathVariable | ( | ) |
Undoes the effect of the last AddToPathVariable call.
| void DigitalSpaces::DICore1::SetTimeoutEvent | ( | const char * | pszEventName, | |
| float | fTimeout, | |||
| DIEventSubscriber1 * | pEventSubscriber | |||
| ) |
Create a callback event that will be called after a period of time.
It is a timeout, not a repeating event, so it will only occur once. To have a repeating timeout event, either call this function again when the event occurs, or consider using a DIScheduledObject.
| pszEventName | A unique name used to identify the Event | |
| fTimeout | Time in seconds to wait before calling the event | |
| pEventSubscriber | The event subscriber to be called |
| void DigitalSpaces::DICore1::RemoveTimeoutEvent | ( | const char * | pszEventName | ) |
Remove a callback event that was previously requested.
| pszEventName | The unique name that was provided to SetTimeoutEvent |
| float DigitalSpaces::DICore1::GetTime | ( | ) |
Returns the internal time as calculated by the Core.
Note that this is the scheduled time, and not real time. If a component is delaying the rest of the system, this value will be less then real time, as the scheduler doesn't advance it's time past what it should have taken, compared to how long it actually did.
| unsigned long DigitalSpaces::DICore1::GetTimeInMS | ( | ) |
Returns the real time taken since the Core started the PerformHeartbeat state.
1.5.6