cee::ug::StateGroupInfo
-
class
StateGroupInfo
Simple class containing metadata info for a group of states.
A state group info contains:
- State group id
- State group name
- State ids of the states in the group
Default state group id is -1 which indicates an invalid id.
See also
Public Functions
-
StateGroupInfo
() Constructs an empty object.
Default id is -1 (invalid)
-
StateGroupInfo
(int id, const Str &name) Constructs a new object with the given state group id and name.
-
StateGroupInfo
(const StateGroupInfo &other) Constructs a new StateGroupInfo that is a copy of other.
-
StateGroupInfo &
operator=
(const StateGroupInfo &rhs) Assigns rhs to this state group info and returns a reference to this state group info.
-
int
id
() const Returns the state group id.
Returns -1 if this state group info object is invalid.
-
size_t
stateCount
() const Returns the number of states in the group.
-
int
stateId
(size_t index) const Returns id of the state at the given index.
-
void
addStateId
(int stateId) Adds a state to this group, defined by its id. There must not be duplicates.
-
bool
hasStateId
(int stateId) const Returns true if the given state is in the group.
-
void
clear
() Clears the states in the group.