![]() |
VR-Forces Developer's Guide
|
Responsible for monitoring resources for a particular entity and issuing database updates when the value changes more than a specified amount.
Classes | |
| struct | ResourceInfo |
Public Member Functions | |
| DtResourceDatabaseLogger (DtLocalObject *entity, double thresholdPercent) | |
| virtual | ~DtResourceDatabaseLogger () |
| virtual void | init () |
| virtual void | reset () |
| virtual void | logResource (DtSimResource *resource) |
Static Public Member Functions | |
| static void | onResourceUpdate (DtSimResource *resource, void *usr) |
Protected Member Functions | |
| virtual DtVrfDatabaseEvent::EventType | eventTypeForResource (const DtSimResource *resource, const DtString &resourceName) const |
Protected Attributes | |
| DtLocalObject * | myEntity |
| double | myThresholdPercent |
| std::map< DtSimResource *, ResourceInfo > | myResourceInfo |
| DtResourceDatabaseLogger::DtResourceDatabaseLogger | ( | DtLocalObject * | entity, |
| double | thresholdPercent | ||
| ) |
Constructor. Requires a pointer to the entity for which the logging should occur as well as the threshold percent, which indicates the percentage a value must change (percentage of the full amount) before an update is logged.
|
virtual |
Destructor.
|
virtual |
Initializes the logger.
|
virtual |
Resets the list of monitored resources.
|
virtual |
Logs the given resource if it meets the criteria for logging.
|
static |
Callback which is called when the DtSimResource value is changed. Causes the DtResourceDatabaseLogger to check if a new event should be logged.
|
protectedvirtual |
|
protected |
|
protected |
|
protected |