#include <Interfaces.h>
Inherits DigitalSpaces::DIObjectBase.
This is the main interface provided by "Factory" objects. This is exported from all components GetComponentInfo function, which is called by the Core after loading a component.
Public Member Functions | |
| float | PerformPrivateStartupStep () |
| Instructs the implementation to perform any initialization work that doesn't involve interaction with any other components. | |
| float | PerformPublicStartupStep () |
| Instructs the implementation to perform initialization work, while allowing access to other components. | |
| bool | PerformHeartbeat (float fDeltaTime, float fDeltaRealTime) |
| The main work function of an implementation, this is called periodically by the Core. | |
| void | StopFactory () |
| Instructs the implementation to perform cleanup, in preperation for being unloaded. | |
| unsigned long | GetMaxRunInterval () |
| Returns the maximum number of heartbeats (10ms) that should occur between calls to PerformHeartbeat. | |
| unsigned long | GetMinRunInterval () |
| Returns the minimum number of heartbeats (10ms) that should occure between calls to PerformHeartbeat. | |
| const char * | GetDescriptiveName () |
| Returns a human readable descriptive name of the implementation, for use in logging and debug output. | |
| float DigitalSpaces::DIScheduledObject::PerformPrivateStartupStep | ( | ) |
Instructs the implementation to perform any initialization work that doesn't involve interaction with any other components.
At this point of initialization, all attempts to find interfaces (GetFactoriesWithInterface) to other factories will return nothing, UNLESS you are requesting an interface implemented by the Core (which is currently DICore1 and DIFileSystemBrowser).
| float DigitalSpaces::DIScheduledObject::PerformPublicStartupStep | ( | ) |
Instructs the implementation to perform initialization work, while allowing access to other components.
The implementation should be aware that as well as having access to other components, other components will have access to this implementation, and should be ready to service any calls. Additionally, the implementation cannot be certain of the order components will be called in, so this implementation may be called from another implementation's PerformPublicStartupStep, without this implementations PerformPublicStartupStep having been called.
| bool DigitalSpaces::DIScheduledObject::PerformHeartbeat | ( | float | fDeltaTime, | |
| float | fDeltaRealTime | |||
| ) |
The main work function of an implementation, this is called periodically by the Core.
This is called based on a variable interval between the values supplied by GetMaxRunInterval and GetMinRunInterval.
| fDeltaTime | The amount of simulated time that has passed since this function was last called for this implementation. Ideally this should match real time, but if the simulation/systemn is under load, it will not. However, it will be consistant, and should be taken as if it was accurate. | |
| fDeltaRealTime | The amount of real time that has passed since this function was lass called for this implementation. |
| void DigitalSpaces::DIScheduledObject::StopFactory | ( | ) |
Instructs the implementation to perform cleanup, in preperation for being unloaded.
| unsigned long DigitalSpaces::DIScheduledObject::GetMaxRunInterval | ( | ) |
Returns the maximum number of heartbeats (10ms) that should occur between calls to PerformHeartbeat.
For the implementation to be called every heartbeat, this should return 1. If your component only needs to perform calculations every second, it should return the value 100. If the implementation wants to be called at every opportunity, it should return 0.
| unsigned long DigitalSpaces::DIScheduledObject::GetMinRunInterval | ( | ) |
Returns the minimum number of heartbeats (10ms) that should occure between calls to PerformHeartbeat.
This allows an implementation to specify the maximum load this component will apply to the system. If your component only needs to perform calculations every second, it should return the value 100. If the implementation wants to be called at every opportunity, it should return 0.
| const char* DigitalSpaces::DIScheduledObject::GetDescriptiveName | ( | ) |
Returns a human readable descriptive name of the implementation, for use in logging and debug output.
1.5.6