cee::vtfx::Block Class Reference

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...
 
- Public Member Functions inherited from cee::RefCountedObject
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...
 
Inheritance diagram for cee::vtfx::Block:
cee::RefCountedObject cee::vtfx::ElementBlock cee::vtfx::GeometryBlock cee::vtfx::GeometryInfoBlock cee::vtfx::NodeBlock cee::vtfx::ResultBlock cee::vtfx::ResultValuesBlock cee::vtfx::SetBlock cee::vtfx::StateInfoBlock cee::vtfx::TransformationResultBlock cee::vtfx::TransformationResultValuesBlock

Detailed Description

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.

Member Enumeration Documentation

Global block type constants used by Ceetron Export. Normally users do not need these, except for some methods of TransformationResultValuesBlock.

Enumerator
NODES 

Node block.

ELEMENTS 

Elements block.

GEOMETRY 

Geometry block.

GEOMETRYINFO 

Geometry info block.

RESULT 

Result block.

RESULTVALUES 

Result values block (scalars, vectors, displacements)

TRANSFORMATIONRESULT 

Transformation result block.

TRANSFORMATIONRESULTVALUES 

Transformation result values block (matrices)

STATEINFO 

State info block.

Constructor & Destructor Documentation

cee::vtfx::Block::Block ( int  blockId)

Constructs an empty block with given block id.

Member Function Documentation

int cee::vtfx::Block::blockId ( ) const

Returns the block id.

cee::vtfx::Block::BlockType cee::vtfx::Block::blockType ( ) const

Returns the block type.

bool cee::vtfx::Block::checkValidity ( ) const
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.