Computer Assisted Medical Intervention Tool Kit  version 5.1
 
Loading...
Searching...
No Matches
Criterion Class Referenceabstract

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
 
 Criterion (mml::Criteria *c, MonitoringManager *monitoringManager, MultipleCriterion *parent=nullptr)
 constructor
 
StoppingCriteriongetChild (const unsigned int i) override
 get the child repered by index, return null if no child
 
std::string getMethodString ()
 get Method Name
 
std::string getName () override=0
 get stopping criterion name
 
int getNumberOfChildren () override
 get number of childre; return -1 for non multiple criteria
 
std::string scopeToString ()
 get Method scope as string
 
 ~Criterion () override
 destructor
 
- Public Member Functions inherited from StoppingCriterion
MultipleCriteriongetParent ()
 get parent multiple criteria
 
 StoppingCriterion (MonitoringManager *monitoringManager, MultipleCriterion *parent=nullptr)
 constructor
 
virtual ~StoppingCriterion ()=default
 destructor
 

Protected Member Functions

virtual void calculate ()=0
 calculate stopping criteria data and store it into values vector
 
void write ()
 write values in the mmlOut file
 

Protected Attributes

double factor
 factor to multiplate for conversion to SI
 
mml::Criteria * mappedObject
 the xsdcxx object representing criterion, used for serialization
 
Methodmeth
 the computationnal method used to check if criterion is true
 
std::string unit
 unit
 
std::vector< double > values
 vector that stores current data of the stopping criteria
 
- Protected Attributes inherited from StoppingCriterion
MonitoringManagermonitoringManager
 monitoring manager
 
MultipleCriterionparent
 parent stopping Criterion
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Criterion()

Criterion::Criterion ( mml::Criteria *  c,
MonitoringManager monitoringManager,
MultipleCriterion parent = nullptr 
)

constructor

Parameters
cthe xsdcxx generated criterion

References MethodFactory::createMethod(), meth, and unit.

◆ ~Criterion()

Criterion::~Criterion ( )
override

destructor

References meth, and values.

Member Function Documentation

◆ calculate()

virtual void Criterion::calculate ( )
protectedpure virtual

calculate stopping criteria data and store it into values vector

Referenced by checkCriterion().

◆ checkCriterion()

bool Criterion::checkCriterion ( )
overridevirtual

return true if the criterion is reach

Implements StoppingCriterion.

References calculate(), meth, Method::test(), and values.

◆ getChild()

StoppingCriterion * Criterion::getChild ( const unsigned int  i)
overridevirtual

get the child repered by index, return null if no child

Implements StoppingCriterion.

◆ getMethodString()

std::string Criterion::getMethodString ( )

get Method Name

References meth, Method::toString(), and unit.

◆ getName()

std::string Criterion::getName ( )
overridepure virtual

get stopping criterion name

Implements StoppingCriterion.

Implemented in ForceCriterion, kineticEnergy, Position, Time, and Velocity.

◆ getNumberOfChildren()

int Criterion::getNumberOfChildren ( )
overridevirtual

get number of childre; return -1 for non multiple criteria

Implements StoppingCriterion.

◆ scopeToString()

std::string Criterion::scopeToString ( )

get Method scope as string

References meth, and Method::scopeTosString().

◆ write()

void Criterion::write ( )
protected

write values in the mmlOut file

References mappedObject, and values.

Member Data Documentation

◆ factor

double Criterion::factor
protected

factor to multiplate for conversion to SI

Referenced by ForceCriterion::ForceCriterion(), Position::Position(), Time::Time(), and Velocity::Velocity().

◆ mappedObject

mml::Criteria* Criterion::mappedObject
protected

the xsdcxx object representing criterion, used for serialization

Referenced by write().

◆ meth

Method* Criterion::meth
protected

the computationnal method used to check if criterion is true

Referenced by checkCriterion(), Criterion(), getMethodString(), scopeToString(), and ~Criterion().

◆ unit

◆ values

std::vector<double> Criterion::values
protected

vector that stores current data of the stopping criteria

Referenced by checkCriterion(), write(), and ~Criterion().


The documentation for this class was generated from the following files: