Simple class containing metadata info for a state. More...
Public Types | |
enum | ReferenceType { TIME, FREQUENCY, LOADCASE, OTHER } |
List of state reference types. More... | |
Public Member Functions | |
StateInfo () | |
Constructs an empty object. More... | |
StateInfo (int stateId, const Str &stateName, ReferenceType refType, double stateRefVal) | |
Constructs a new object with the given state id, state name, reference type and state reference value. More... | |
StateInfo (int stateId, const Str &stateName, double stateRefVal) | |
Constructs a new object with the given state id, state name and state reference value. More... | |
StateInfo (const StateInfo &other) | |
Constructs a new StateInfo that is a copy of other. More... | |
StateInfo & | operator= (const StateInfo &rhs) |
Assigns rhs to this state info and returns a reference to this state info. More... | |
bool | operator== (const StateInfo &rhs) const |
Returns true if the object is equal to rhs. More... | |
bool | operator!= (const StateInfo &rhs) const |
Returns true if the object is not equal to rhs. More... | |
int | id () const |
Returns the state id. More... | |
Str | name () const |
Returns the state name. More... | |
double | referenceValue () const |
Returns the state reference value. More... | |
ReferenceType | referenceType () const |
Returns the state reference type (time, frequency, load case, none) More... | |
Simple class containing metadata info for a state.
A state info contains:
Default state id is -1 which indicates an invalid id.
Metadata for a model is accessed from the data source directory.
Example on getting the state id for the last state using the metadata directory.
See the complete source code at: UnstructGrid: Load model from file and set up model specification
cee::ug::StateInfo::StateInfo | ( | ) |
Constructs an empty object.
Default id is -1 (invalid)
cee::ug::StateInfo::StateInfo | ( | int | stateId, |
const Str & | stateName, | ||
ReferenceType | refType, | ||
double | stateRefVal | ||
) |
Constructs a new object with the given state id, state name, reference type and state reference value.
cee::ug::StateInfo::StateInfo | ( | int | stateId, |
const Str & | stateName, | ||
double | stateRefVal | ||
) |
Constructs a new object with the given state id, state name and state reference value.
cee::ug::StateInfo::StateInfo | ( | const StateInfo & | other | ) |
Constructs a new StateInfo that is a copy of other.
int cee::ug::StateInfo::id | ( | ) | const |
Returns the state id.
Returns -1 if this state info object is invalid.
Str cee::ug::StateInfo::name | ( | ) | const |
Returns the state name.
bool cee::ug::StateInfo::operator!= | ( | const StateInfo & | rhs | ) | const |
Returns true if the object is not equal to rhs.
Assigns rhs to this state info and returns a reference to this state info.
bool cee::ug::StateInfo::operator== | ( | const StateInfo & | rhs | ) | const |
Returns true if the object is equal to rhs.
StateInfo::ReferenceType cee::ug::StateInfo::referenceType | ( | ) | const |
Returns the state reference type (time, frequency, load case, none)
double cee::ug::StateInfo::referenceValue | ( | ) | const |
Returns the state reference value.