GCBM
|
#include <cbmtransitionrulesmodule.h>
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 |
TransitionRule | ( | ) |
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.
data | DynamicObject& |
TransitionRule | ( | int | id, |
int | resetAge, | ||
int | regenDelay | ||
) |
void addClassifier | ( | std::string | name, |
std::string | value | ||
) |
const std::unordered_map<std::string, std::string> classifiers | ( | ) | const |
int id | ( | ) |
int regenDelay | ( | ) |
int resetAge | ( | ) |
AgeResetType resetType | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |