![]() |
VR-Forces 4.0.4 Class Documentation
|
class DtScenarioBatchIterator More...
Public Member Functions | |
| DtScenarioBatchIterator () | |
| virtual | ~DtScenarioBatchIterator () |
| virtual bool | init () |
| virtual void | setScenarioBatch (const DtScenarioBatch &batch) |
| Sets the scenario batch to iterate over. | |
| virtual void | reset () |
| Resets the iterator to the beginning of the batch. | |
| virtual const DtScenario * | nextRun () |
| Constructs and returns a pointer to the scenario representing the next run in the batch. | |
| virtual const DtScenarioBatchRecord * | currentRecord () const |
| Returns a pointer to the DtScenarioBatchRecord which was used to construct the current scenario. | |
| virtual const DtScenario * | currentScenario () const |
| Returns a pointer to the current scenario. | |
| virtual const DtScenarioBatch * | scenarioBatch () const |
| Returns a pointer to the scenario batch being used. | |
| virtual int | runCount () const |
| Total number of runs for current batch. | |
| virtual int | currentRunNumber () const |
| Number of current run. | |
| virtual double | totalTime () const |
| Total runtime for all scenario runs in current batch. | |
| virtual double | elapsedTime () const |
| Time for all runs that have been completed in current batch. | |
| virtual double | timeToGo () const |
| Time remaining for all uncompleted runs in current batch. | |
| virtual double | percentTimeComplete () const |
| Percent (by time) of completeness of the current batch. | |
| virtual void | nextScenario () |
| Sets internal variables so the next time nextRun() is called it will move onto the next scenario in the batch rather than the next run in the current scenario. | |
Protected Member Functions | |
| DtScenarioBatchIterator (const DtScenarioBatchIterator &orig) | |
| Not implemented. Do not use. | |
| DtScenarioBatchIterator & | operator= (const DtScenarioBatchIterator &orig) |
| virtual bool | constructCurrentScenario () |
| Reads the scenario file for the current record and modifies it according to entries in the current record and places the result in currentScenario. | |
| virtual void | calculateTotals () |
| Calculates the total number of runs and the total time for the current batch. | |
Protected Attributes | |
| DtScenarioBatch | myScenarioBatch |
| DtListItem * | myCurrentRecordItem |
| DtScenario * | myCurrentScenario |
| int | myRunNumber |
| int | myRunCount |
| within a record | |
| int | myTotalRuns |
| total count since start of batch | |
| double | myTotalTime |
| double | myElapsedTime |
| Total time of all scenario runs. (seconds) | |
Static Protected Attributes | |
| static const int | theUseComputerGeneratedSeed |
| Time of all scenario runs completed. (seconds) | |
class DtScenarioBatchIterator
An instance of DtScenarioBatchIterator provides an iterator over scenarios constructed from a scenario batch. This class is responsible for constructing the scenarios from the data in the batch.
| virtual DtScenarioBatchIterator::~DtScenarioBatchIterator | ( | ) | [virtual] |
| DtScenarioBatchIterator::DtScenarioBatchIterator | ( | const DtScenarioBatchIterator & | orig | ) | [protected] |
Not implemented. Do not use.
| virtual bool DtScenarioBatchIterator::init | ( | ) | [virtual] |
| virtual void DtScenarioBatchIterator::setScenarioBatch | ( | const DtScenarioBatch & | batch | ) | [virtual] |
Sets the scenario batch to iterate over.
Resets the current iteration to the start.
| virtual void DtScenarioBatchIterator::reset | ( | ) | [virtual] |
Resets the iterator to the beginning of the batch.
| virtual const DtScenario* DtScenarioBatchIterator::nextRun | ( | ) | [virtual] |
Constructs and returns a pointer to the scenario representing the next run in the batch.
Returns NULL if no more scenarios are left.
| virtual const DtScenarioBatchRecord* DtScenarioBatchIterator::currentRecord | ( | ) | const [virtual] |
Returns a pointer to the DtScenarioBatchRecord which was used to construct the current scenario.
| virtual const DtScenario* DtScenarioBatchIterator::currentScenario | ( | ) | const [virtual] |
Returns a pointer to the current scenario.
| virtual const DtScenarioBatch* DtScenarioBatchIterator::scenarioBatch | ( | ) | const [virtual] |
Returns a pointer to the scenario batch being used.
| virtual int DtScenarioBatchIterator::runCount | ( | ) | const [virtual] |
Total number of runs for current batch.
| virtual int DtScenarioBatchIterator::currentRunNumber | ( | ) | const [virtual] |
Number of current run.
| virtual double DtScenarioBatchIterator::totalTime | ( | ) | const [virtual] |
Total runtime for all scenario runs in current batch.
| virtual double DtScenarioBatchIterator::elapsedTime | ( | ) | const [virtual] |
Time for all runs that have been completed in current batch.
| virtual double DtScenarioBatchIterator::timeToGo | ( | ) | const [virtual] |
Time remaining for all uncompleted runs in current batch.
| virtual double DtScenarioBatchIterator::percentTimeComplete | ( | ) | const [virtual] |
Percent (by time) of completeness of the current batch.
| virtual void DtScenarioBatchIterator::nextScenario | ( | ) | [virtual] |
Sets internal variables so the next time nextRun() is called it will move onto the next scenario in the batch rather than the next run in the current scenario.
| DtScenarioBatchIterator& DtScenarioBatchIterator::operator= | ( | const DtScenarioBatchIterator & | orig | ) | [protected] |
| virtual bool DtScenarioBatchIterator::constructCurrentScenario | ( | ) | [protected, virtual] |
Reads the scenario file for the current record and modifies it according to entries in the current record and places the result in currentScenario.
| virtual void DtScenarioBatchIterator::calculateTotals | ( | ) | [protected, virtual] |
Calculates the total number of runs and the total time for the current batch.
DtListItem* DtScenarioBatchIterator::myCurrentRecordItem [protected] |
DtScenario* DtScenarioBatchIterator::myCurrentScenario [protected] |
int DtScenarioBatchIterator::myRunNumber [protected] |
int DtScenarioBatchIterator::myRunCount [protected] |
within a record
int DtScenarioBatchIterator::myTotalRuns [protected] |
total count since start of batch
double DtScenarioBatchIterator::myTotalTime [protected] |
double DtScenarioBatchIterator::myElapsedTime [protected] |
Total time of all scenario runs. (seconds)
const int DtScenarioBatchIterator::theUseComputerGeneratedSeed [static, protected] |
Time of all scenario runs completed. (seconds)