8 #include <vlutil/vlMachineTypes.h>
30 parentRegistry = NULL);
66 virtual void setAmount(
int amount);
67 virtual int amount()
const;
70 virtual void deplete(
int amount = 1);
74 virtual void replenish(
int amount = 1);
76 virtual void setFullAmount(
int fullAmount);
77 virtual int fullAmount()
const;
84 virtual int constrainAmount(
int amount)
const;
virtual void setPercentageFull(DtReal percent)=0
Percent will be truncated to be between 0. and 1.
virtual DtReal percentageFull() const =0
The deriving class will also provide a function to specify the quantity (of the appropriate type) tha...
virtual DtString type() const =0
The data type of the resource. These types are defined in rsrcTypes.h.
virtual void merge(const DtSimResource *)
DtRwInt myAmount
Definition: integerResource.h:98
Definition: readerWriterRegistry.h:39
virtual void updateFullAmountFromChildren()=0
When the deriving class's setFullAmount is called, this should be called on the resources parent...
DtSimResource & operator=(const DtSimResource &orig)
assignment operator
virtual void distributeFullAmountToChildren()=0
When the deriving class's setFullAmount is called, this should be called if the resource has any chil...
virtual void distributeAmountToChildren()=0
When the deriving class's setAmount is called, this should be called if the resource has any children...
Description: Readable, Writable int.
Definition: rwInt.h:25
DtIntegerResource implements the required functions for a resource that can be measured by an integer...
Definition: integerResource.h:17
virtual bool isEqual(const DtSimResource &res) const
virtual DtSimResource * clone(DtReaderWriterRegistry *parentRegistry=0) const =0
DtSimResource is an abstract base class that can be used to create a hierarchical resource list of a ...
Definition: simResource.h:42
virtual void updateAmountFromChildren()=0
When the deriving class's setAmount is called, this should be called on the resources parent...
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
DtRwInt myFullAmount
Definition: integerResource.h:99