GCBM
Public Member Functions | Private Attributes | List of all members
TransitionRule Class Reference

#include <cbmtransitionrulesmodule.h>

Collaboration diagram for TransitionRule:
Collaboration graph

Public Member Functions

 TransitionRule ()
 
 TransitionRule (const DynamicObject &data)
 
 TransitionRule (int id, int resetAge, int regenDelay)
 
int id ()
 
AgeResetType resetType ()
 
int resetAge ()
 
int regenDelay ()
 
const std::unordered_map< std::string, std::string > classifiers () const
 
void addClassifier (std::string name, std::string value)
 

Private Attributes

int _id
 
AgeResetType _resetType
 
int _resetAge
 
int _regenDelay
 
std::unordered_map< std::string, std::string > _classifiers
 

Constructor & Destructor Documentation

◆ TransitionRule() [1/3]

◆ TransitionRule() [2/3]

TransitionRule ( const DynamicObject &  data)

Constructor.

Initialise TransitionRule._Id, TransitionRule._resetAge and CBMTransitionRulesModule._regenDelay.
if parameter data does not contain "reset_type",
assign TransitionRule._resetType as AgeResetType::Absolute.
else assign resetType as "reset_type" in parameter data.
if resetType is equal to "absolute", assign TransitionRule._resetType as AgeResetType::Absolute.
else if resetType is equal to "relative", assign TransitionRule._resetType as AgeResetType::Relative.
else if resetType is equal to "yield", assign TransitionRule._resetType as AgeResetType::Yield.
else print out a log error.

Parameters
dataDynamicObject&

◆ TransitionRule() [3/3]

TransitionRule ( int  id,
int  resetAge,
int  regenDelay 
)

Member Function Documentation

◆ addClassifier()

void addClassifier ( std::string  name,
std::string  value 
)

◆ classifiers()

const std::unordered_map<std::string, std::string> classifiers ( ) const

◆ id()

int id ( )

◆ regenDelay()

int regenDelay ( )

◆ resetAge()

int resetAge ( )

◆ resetType()

AgeResetType resetType ( )

Member Data Documentation

◆ _classifiers

std::unordered_map<std::string, std::string> _classifiers
private

◆ _id

int _id
private

◆ _regenDelay

int _regenDelay
private

◆ _resetAge

int _resetAge
private

◆ _resetType

AgeResetType _resetType
private

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