Class which represents a simple criterion A criterion can be checked using checkCriterion method to know if the criterion is reach A criterion calculate a set of double (values) wich is checked by a method (method) to make the boolean assessment of checkCriterion. More...
#include <Criterion.h>
Public Member Functions | |
bool | checkCriterion () override |
return true if the criterion is reach More... | |
Criterion (mml::Criteria *c, MonitoringManager *monitoringManager, MultipleCriterion *parent=nullptr) | |
constructor More... | |
StoppingCriterion * | getChild (const unsigned int i) override |
get the child repered by index, return null if no child More... | |
std::string | getMethodString () |
get Method Name More... | |
std::string | getName () override=0 |
get stopping criterion name More... | |
int | getNumberOfChildren () override |
get number of childre; return -1 for non multiple criteria More... | |
std::string | scopeToString () |
get Method scope as string More... | |
~Criterion () override | |
destructor More... | |
Public Member Functions inherited from StoppingCriterion | |
MultipleCriterion * | getParent () |
get parent multiple criteria More... | |
StoppingCriterion (MonitoringManager *monitoringManager, MultipleCriterion *parent=nullptr) | |
constructor More... | |
virtual | ~StoppingCriterion ()=default |
destructor More... | |
Protected Member Functions | |
virtual void | calculate ()=0 |
calculate stopping criteria data and store it into values vector More... | |
void | write () |
write values in the mmlOut file More... | |
Protected Attributes | |
double | factor |
factor to multiplate for conversion to SI More... | |
mml::Criteria * | mappedObject |
the xsdcxx object representing criterion, used for serialization More... | |
Method * | meth |
the computationnal method used to check if criterion is true More... | |
std::string | unit |
unit More... | |
std::vector< double > | values |
vector that stores current data of the stopping criteria More... | |
Protected Attributes inherited from StoppingCriterion | |
MonitoringManager * | monitoringManager |
monitoring manager More... | |
MultipleCriterion * | parent |
parent stopping Criterion More... | |
Class which represents a simple criterion A criterion can be checked using checkCriterion method to know if the criterion is reach A criterion calculate a set of double (values) wich is checked by a method (method) to make the boolean assessment of checkCriterion.
Criterion::Criterion | ( | mml::Criteria * | c, |
MonitoringManager * | monitoringManager, | ||
MultipleCriterion * | parent = nullptr |
||
) |
constructor
c | the xsdcxx generated criterion |
References MethodFactory::createMethod(), meth, and unit.
|
protectedpure virtual |
calculate stopping criteria data and store it into values vector
Implemented in ForceCriterion, kineticEnergy, Position, Time, and Velocity.
Referenced by checkCriterion().
|
overridevirtual |
return true if the criterion is reach
Implements StoppingCriterion.
References calculate(), meth, Method::test(), and values.
|
overridevirtual |
get the child repered by index, return null if no child
Implements StoppingCriterion.
std::string Criterion::getMethodString | ( | ) |
get Method Name
References meth, Method::toString(), and unit.
|
overridepure virtual |
get stopping criterion name
Implements StoppingCriterion.
Implemented in ForceCriterion, kineticEnergy, Position, Time, and Velocity.
|
overridevirtual |
get number of childre; return -1 for non multiple criteria
Implements StoppingCriterion.
std::string Criterion::scopeToString | ( | ) |
get Method scope as string
References meth, and Method::scopeTosString().
|
protected |
write values in the mmlOut file
References mappedObject, and values.
Referenced by Position::calculate().
|
protected |
factor to multiplate for conversion to SI
Referenced by Position::calculate(), ForceCriterion::ForceCriterion(), Position::Position(), Time::Time(), and Velocity::Velocity().
|
protected |
the xsdcxx object representing criterion, used for serialization
Referenced by write().
|
protected |
the computationnal method used to check if criterion is true
Referenced by checkCriterion(), Criterion(), getMethodString(), scopeToString(), and ~Criterion().
|
protected |
unit
Referenced by Criterion(), ForceCriterion::ForceCriterion(), getMethodString(), Position::Position(), Time::Time(), and Velocity::Velocity().
|
protected |
vector that stores current data of the stopping criteria
Referenced by Position::calculate(), Time::calculate(), checkCriterion(), write(), and ~Criterion().