A block defining the meta data of the states in the database. More...
Public Types | |
enum | ReferenceValueType { TIME = 0, FREQUENCY = 1, LOADCASE = 2, OTHER = 3 } |
Global state reference value types used by Ceetron Export. These constants are used for various methods of StateInfo related to state reference value types. More... | |
![]() | |
enum | BlockType { NODES, ELEMENTS, GEOMETRY, GEOMETRYINFO, RESULT, RESULTVALUES, TRANSFORMATIONRESULT, TRANSFORMATIONRESULTVALUES, STATEINFO, SET, ILLEGAL } |
Global block type constants used by Ceetron Export. Normally users do not need these, except for some methods of TransformationResultValuesBlock. More... | |
Public Member Functions | |
StateInfoBlock () | |
Constructs an empty state info block. More... | |
bool | addStateInfo (int stateId, const Str &stateName, float stateReferenceValue, ReferenceValueType referenceValueType) |
Adds a state definition to the block, supplying state information. More... | |
size_t | stateCount () const |
Returns the number of state info definitions in this block. More... | |
size_t | stateIndex (int stateId) const |
Returns the state index for the given state id. More... | |
int | stateId (size_t stateIndex) const |
Returns the state id for the given state index. More... | |
Str | stateName (size_t stateIndex) const |
Returns the state name for the given index. More... | |
float | stateReferenceValue (size_t stateIndex) const |
Returns the state's reference value (time/frequency/load case/...) for the given state index. More... | |
ReferenceValueType | stateReferenceValueType (size_t stateIndex) const |
Returns the state reference value type for the given index. More... | |
bool | addGroupInfo (int groupId, const Str &groupName, const std::vector< int > &stateIds) |
Adds group info. More... | |
size_t | groupCount () const |
Returns number of groups. More... | |
int | groupId (size_t groupIndex) const |
Returns group id. More... | |
Str | groupName (size_t groupIndex) const |
Returns group name. More... | |
std::vector< int > | groupStateIds (size_t groupIndex) const |
Returns array of group state ids. More... | |
bool | checkValidity () const |
Returns false if the weak validity check fails. More... | |
![]() | |
Block (int blockId) | |
Constructs an empty block with given block id. More... | |
int | blockId () const |
Returns the block id. More... | |
BlockType | blockType () const |
Returns the block type. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
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").
Global state reference value types used by Ceetron Export. These constants are used for various methods of StateInfo related to state reference value types.
cee::vtfx::StateInfoBlock::StateInfoBlock | ( | ) |
Constructs an empty state info block.
Only one state info block per database is needed and allowed.
bool cee::vtfx::StateInfoBlock::addGroupInfo | ( | int | groupId, |
const Str & | groupName, | ||
const std::vector< int > & | stateIds | ||
) |
Adds group info.
bool cee::vtfx::StateInfoBlock::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.
|
virtual |
Returns false if the weak validity check fails.
Reimplemented from cee::vtfx::Block.
size_t cee::vtfx::StateInfoBlock::groupCount | ( | ) | const |
Returns number of groups.
int cee::vtfx::StateInfoBlock::groupId | ( | size_t | groupIndex | ) | const |
Returns group id.
Str cee::vtfx::StateInfoBlock::groupName | ( | size_t | groupIndex | ) | const |
Returns group name.
std::vector< int > cee::vtfx::StateInfoBlock::groupStateIds | ( | size_t | groupIndex | ) | const |
Returns array of group state ids.
size_t cee::vtfx::StateInfoBlock::stateCount | ( | ) | const |
Returns the number of state info definitions in this block.
int cee::vtfx::StateInfoBlock::stateId | ( | size_t | stateInfoIndex | ) | const |
Returns the state id for the given state index.
Returns -1 if the index is invalid.
size_t cee::vtfx::StateInfoBlock::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.
cee::Str cee::vtfx::StateInfoBlock::stateName | ( | size_t | stateInfoIndex | ) | const |
Returns the state name for the given index.
Returns an empty string if state index is invalid.
float cee::vtfx::StateInfoBlock::stateReferenceValue | ( | size_t | stateInfoIndex | ) | 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.
StateInfoBlock::ReferenceValueType cee::vtfx::StateInfoBlock::stateReferenceValueType | ( | size_t | stateIndex | ) | const |
Returns the state reference value type for the given index.