Abstract base class for all VTFx blocks. More...
Public Types | |
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 | |
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... | |
virtual bool | checkValidity () const |
Does a weak check for valid block contents just before the block is being written. 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... | |
Abstract base class for all VTFx blocks.
Only for internal use in Ceetron Export.
All blocks must have an id that is equal to or greater than zero. The block id must be unique within each block class and the database they have been added to. Blocks use their id to reference each other, e.g. an element block references its associated node blocks using block ids.
Usually one creates a block in a local scope and also writes the block to a database (or a case) within that scope. Databases and cases do not take the ownership of blocks, so it is up the user to clean up block instances properly.
Global block type constants used by Ceetron Export. Normally users do not need these, except for some methods of TransformationResultValuesBlock.
cee::vtfx::Block::Block | ( | int | blockId | ) |
Constructs an empty block with given block id.
int cee::vtfx::Block::blockId | ( | ) | const |
Returns the block id.
cee::vtfx::Block::BlockType cee::vtfx::Block::blockType | ( | ) | const |
Returns the block type.
|
virtual |
Does a weak check for valid block contents just before the block is being written.
This method checks if the user forgot to set pre-defined values such as ids, block mappings, names, etc. Note: Only a weak check is possible since a block might appear valid, but still can cause problems in the context of a complete VTFx file.
Returns true if no invalid settings were found in block.
Reimplemented in cee::vtfx::ResultBlock, cee::vtfx::ElementBlock, cee::vtfx::StateInfoBlock, cee::vtfx::ResultValuesBlock, cee::vtfx::TransformationResultBlock, cee::vtfx::GeometryBlock, and cee::vtfx::TransformationResultValuesBlock.