Workspace 6.21.5
|
Defines a class to hold info for one particular state. More...
#include <Mesh/DataStructures/stateinfo.h>
Public Types | |
enum | StateType { StateTypeUndefined , Scalar , Vector , Integer } |
Public Member Functions | |
StateInfo () | |
StateInfo (const QString &name) | |
StateInfo (const QString &name, const Vector3d &defaultVal) | |
StateInfo (const QString &name, double defaultVal) | |
StateInfo (const QString &name, long defaultVal) | |
long | getDefaultInteger () const |
double | getDefaultScalar () const |
const Vector3d & | getDefaultVector () const |
int | getIndex () const |
const QString & | getName () const |
StateType | getStateType () const |
bool | isDefined () const |
bool | isInteger () const |
bool | isScalar () const |
bool | isVector () const |
void | setDefault (const StateInfo &stateInfo) |
void | setDefaultInteger (long defaultVal) |
void | setDefaultScalar (double defaultVal) |
void | setDefaultVector (const Vector3d &defaultVal) |
void | setIndex (int i) |
void | setName (const QString &name) |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator== (const StateInfo &lhs, const StateInfo &rhs) |
A state can be either a scalar double, a vector double, or an integer. Vector doubles are always 3-element vectors, designed for use with the Vector3d class.
enum StateType |
StateInfo | ( | ) |
Constructs a null state info object. isDefined() will return false.
StateInfo | ( | const QString & | name | ) |
Constructs a null state info object except with the name set. This is useful for removal operations. isDefined() will return false.
StateInfo | ( | const QString & | name, |
double | defaultVal | ||
) |
Constructs a scalar state info object.
Constructs a vector state info object.
StateInfo | ( | const QString & | name, |
long | defaultVal | ||
) |
Constructs an integer data state info object.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void setDefault | ( | const StateInfo & | stateInfo | ) |
Copies all the defaults from stateInfo to this object.
void setDefaultInteger | ( | long | defaultVal | ) |
defaultVal | The new default value. |
void setDefaultScalar | ( | double | defaultVal | ) |
defaultVal | The new default value. |
void setDefaultVector | ( | const Vector3d & | defaultVal | ) |
defaultVal | The new default value. |
|
inline |
Sets the index of the state to i.
|
inline |
Sets the name of the state to name.