class StateInfoBlock : public Block

A block defining the meta data of the states in the database.

There must be only one state info block in each database. One has to define a state info for each state.

Depending on the analysis, a state type is either a time step (for time variant analysis), a load case, or a frequency (modal analysis). The state’s reference value is consequently either a time, a number, or a frequency value.

For static analysis results, the state type and value do not have a meaning, but need to be supplied anyways (use type “other”).

Public Types

enum ReferenceValueType

Global state reference value types used by the VTFx component.

These constants are used for various methods of StateInfo related to state reference value types.


enumerator TIME

Time reference value (unit shall be reflected by the state name)

enumerator FREQUENCY

Frequency reference value (for modal analysis)

enumerator LOADCASE

Load case reference value (for various load cases within a database)

enumerator OTHER

Other reference value (when all the value type above are not suitable)

Public Functions


Constructs an empty state info block.

Only one state info block per database is needed and allowed.

bool addStateInfo(int stateId, const Str &stateName, float stateReferenceValue, ReferenceValueType referenceValueType)

Adds a state definition to the block, supplying state information.

stateId is the id of the state to define. stateName is a state name as a single line of text. referenceValue is the reference value (time, frequency or whatever matches the reference value type specified by referenceValueType.)

Call this method for each state you want to define, and write the block after all states have been defined.

Returns false if an error occurred. See the log for more information.

size_t stateCount() const

Returns the number of state info definitions in this block.

size_t stateIndex(int stateId) const

Returns the state index for the given state id.

Returns cee::UNDEFINED_SIZE_T if an invalid state id was given.

int stateId(size_t stateIndex) const

Returns the state id for the given state index.

Returns -1 if the index is invalid.

Str stateName(size_t stateIndex) const

Returns the state name for the given index.

Returns an empty string if state index is invalid.

float stateReferenceValue(size_t stateIndex) const

Returns the state’s reference value (time/frequency/load case/…) for the given state index.

Returns cee::UNDEFINED_FLOAT if state index is invalid.

ReferenceValueType stateReferenceValueType(size_t stateIndex) const

Returns the state reference value type for the given index.

bool addGroupInfo(int groupId, const Str &groupName, const std::vector<int> &stateIds)

Adds group info.

size_t groupCount() const

Returns number of groups.

int groupId(size_t groupIndex) const

Returns group id.

Str groupName(size_t groupIndex) const

Returns group name.

std::vector<int> groupStateIds(size_t groupIndex) const

Returns array of group state ids.

virtual bool checkValidity() const

Returns false if the weak validity check fails.