DIScheduledObject Struct Reference
[Core]

#include <Interfaces.h>

Inherits DIObjectBase.


Detailed Description

Interface for an object to be scheduled and called by the Core.

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.

Todo:
Give consideration to changing the system, so that rather then GetComponentInfo returning a structure that contains DIScheduledObject, the DICore supports being given a DIScheduledObject, at any point in time. This would allow the use of the scheduler in more situations, in a more flexible arrangement.
Todo:
Also under consideration is changing the GetMaxRunInterval/GetMinRunInterval system to something where the Core asks the DIScheduledObject to decrease or increase it's load on the system, and it's up to the component implementation if this involves changing its call frequency. This would additionally allow the component to know when to enact Level Of Detail changes, and such.

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.

Member Function Documentation

float 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).

Returns:
A value between 0.0 and 1.0 indicates there is more work to be done, and the function should be called again. A value of 1.0 or larger indicates that all initialization is complete. A value less then 0.0 indicates an error, and the Core should abort loading.
Note:
Even after returning a value of 1.0, this function may be called again.


The documentation for this struct was generated from the following file:

Generated on Sun Aug 31 17:46:28 2008 for Digital Spaces by  doxygen 1.5.6