Workspace 6.21.5
|
Implementation of MeshElementsInterface that delay-loads data stored in a specific Hdf5 file as it is needed. More...
#include <HDF5/hdf5meshelementsinterface.h>
Public Member Functions | |
Hdf5MeshElementsInterface (const Hdf5MeshElementsInterface &) | |
Hdf5MeshElementsInterface (const Mesh::ElementType::Type &type) | |
Mesh::ElementHandle | add (const Mesh::NodeHandleList &nodes) override |
void | clear () override |
iterator | erase (const iterator &position) override |
Mesh::NodeHandle | getNode (const Mesh::ElementHandle &element, size_type index) const override |
bool | getNodes (const Mesh::ElementHandle &element, Mesh::NodeHandleList &nodes) const override |
bool | getState (const Mesh::ElementHandle &elementHandle, const Mesh::ElementStateHandle &state, double &result) const override |
bool | getState (const Mesh::ElementHandle &elementHandle, const Mesh::ElementStateHandle &state, int_type &result) const override |
bool | getState (const Mesh::ElementHandle &elementHandle, const Mesh::ElementStateHandle &state, Mesh::Vector3d &result) const override |
bool | getState (const Mesh::ElementHandle &elementHandle, const Mesh::ElementStateHandle &state, quint16 &result) const override |
bool | getState (const Mesh::ElementHandle &elementHandle, const Mesh::ElementStateHandle &state, quint8 &result) const override |
bool | initialize (hid_t &file, const QString &meshName, int lod) |
bool | isStateTypeSupported (const DataExecution::DataFactory &dataFactory) const override |
bool | loadNodeIndices (const Mesh::ElementType::Type &type) |
Hdf5MeshElementsInterface & | operator= (const Hdf5MeshElementsInterface &) |
void | remove (const Mesh::ElementHandle &elementHandle) override |
void | reserve (size_type n) override |
bool | setNode (const Mesh::ElementHandle &element, const Mesh::NodeHandle &node, size_type index) override |
bool | setNodes (const Mesh::ElementHandle &element, const Mesh::NodeHandleList &nodes) override |
bool | setState (const Mesh::ElementHandle &elementHandle, const Mesh::ElementStateHandle &state, const DataExecution::DataObject &value) override |
bool | setState (const Mesh::ElementHandle &elementHandle, const Mesh::ElementStateHandle &state, const Mesh::Vector3d &value) override |
bool | setState (const Mesh::ElementHandle &elementHandle, const Mesh::ElementStateHandle &state, double value) override |
bool | setState (const Mesh::ElementHandle &elementHandle, const Mesh::ElementStateHandle &state, int_type value) override |
bool | setState (const Mesh::ElementHandle &elementHandle, const Mesh::ElementStateHandle &state, quint16 value) override |
bool | setState (const Mesh::ElementHandle &elementHandle, const Mesh::ElementStateHandle &state, quint8 value) override |
size_type | size () const override |
Public Member Functions inherited from MeshElementsInterface | |
ElementHandle | add (const NodeHandle &node0, const NodeHandle &node1) |
ElementHandle | add (const NodeHandle &node0, const NodeHandle &node1, const NodeHandle &node2) |
ElementHandle | add (const NodeHandle &node0, const NodeHandle &node1, const NodeHandle &node2, const NodeHandle &node3) |
ElementHandle | add (const NodeHandle &node0, const NodeHandle &node1, const NodeHandle &node2, const NodeHandle &node3, const NodeHandle &node4, const NodeHandle &node5, const NodeHandle &node6, const NodeHandle &node7) |
virtual ElementHandle | add (const NodeHandleList &nodes)=0 |
const ElementStateHandle & | addState (const QString &name, const DataExecution::DataObject &defaultValue) |
template<typename T > | |
const ElementStateHandle & | addState (const QString &name, const T &defaultValue) |
iterator | begin () |
const_iterator | begin () const |
virtual bool | canAddState (const DataExecution::DataObject &defaultValue) |
virtual bool | canRemoveState (const ElementStateHandle &state) |
virtual void | clear ()=0 |
virtual bool | digestContiguousFloatStateData (const ElementStateHandle &state, std::function< bool(size_type numElems, size_type nodesPerElem, size_type stride, const double *data)> digestFunc) const |
virtual bool | digestContiguousIntegerStateData (const ElementStateHandle &state, std::function< bool(size_type numElems, size_type nodesPerElem, size_type stride, const int_type *data)> digestFunc) const |
virtual bool | digestContiguousNodeIndexData (std::function< bool(size_type numElems, size_type nodesPerElem, size_type stride, const ItemHandle::size_type *data)> digestFunc) const |
virtual bool | digestContiguousUInt16StateData (const ElementStateHandle &state, std::function< bool(size_type numElems, size_type nodesPerElem, size_type stride, const quint16 *data)> digestFunc) const |
virtual bool | digestContiguousUInt8StateData (const ElementStateHandle &state, std::function< bool(size_type numElems, size_type nodesPerElem, size_type stride, const quint8 *data)> digestFunc) const |
bool | empty () const |
iterator | end () |
const_iterator | end () const |
bool | ensureAllStatesSupported (const ElementStateHandleList &states) |
virtual iterator | erase (const iterator &position)=0 |
ElementStateHandleList | getAllStateHandles () const |
virtual ContiguousDataAccessType | getContiguousDataAccessType () const |
const ElementType::Type & | getElementType () const |
virtual NodeHandle | getNode (const ElementHandle &element, size_type index) const =0 |
virtual int | getNodeIndex (const ElementHandle &element, const NodeHandle &node) const |
virtual bool | getNodes (const ElementHandle &element, NodeHandleList &nodes) const =0 |
bool | getState (const ElementHandle &elementHandle, const ElementStateHandle &state, DataExecution::DataObject &result) |
bool | getState (const ElementHandle &elementHandle, const ElementStateHandle &state, DataExecution::DataObject &result) const |
virtual bool | getState (const ElementHandle &elementHandle, const ElementStateHandle &state, double &result) const |
virtual bool | getState (const ElementHandle &elementHandle, const ElementStateHandle &state, int_type &result) const |
virtual bool | getState (const ElementHandle &elementHandle, const ElementStateHandle &state, quint16 &result) const |
virtual bool | getState (const ElementHandle &elementHandle, const ElementStateHandle &state, quint8 &result) const |
virtual bool | getState (const ElementHandle &elementHandle, const ElementStateHandle &state, Vector3d &result) const |
const ElementStateHandle & | getStateHandle (const QString &name) const |
bool | hasState (const QString &name) const |
virtual bool | isAttached (const ElementHandle &element, const NodeHandle &node) const |
virtual bool | isStateTypeSupported (const DataExecution::DataFactory &dataFactory) const =0 |
virtual bool | isValid () const |
virtual bool | load (MeshSerializer &serializer) |
virtual void | remove (const ElementHandle &elementHandle)=0 |
bool | removeAllStates () |
bool | removeState (const ElementStateHandle &state) |
bool | removeState (const QString &name) |
bool | renameState (const QString &from, const QString &to) |
virtual void | reserve (size_type n) |
virtual bool | save (MeshSerializer &serializer, const NodeHandleIndexHash &nodeIds) const |
virtual bool | setNode (const ElementHandle &element, const NodeHandle &node, size_type index)=0 |
virtual bool | setNodes (const ElementHandle &element, const NodeHandleList &nodes)=0 |
virtual bool | setState (const ElementHandle &elementHandle, const ElementStateHandle &state, const DataExecution::DataObject &value)=0 |
virtual bool | setState (const ElementHandle &elementHandle, const ElementStateHandle &state, const Vector3d &value) |
virtual bool | setState (const ElementHandle &elementHandle, const ElementStateHandle &state, double value) |
virtual bool | setState (const ElementHandle &elementHandle, const ElementStateHandle &state, int_type value) |
virtual bool | setState (const ElementHandle &elementHandle, const ElementStateHandle &state, quint16 value) |
virtual bool | setState (const ElementHandle &elementHandle, const ElementStateHandle &state, quint8 value) |
virtual size_type | size () const =0 |
Additional Inherited Members | |
Public Types inherited from MeshElementsInterface | |
enum | ContiguousDataAccessType { DirectBufferAccess , CopiedBufferAccess } |
The type of access that a particular implementation provides to contiguous data. More... | |
using | int_type = MeshModelInterface::int_type |
using | ItemHandleListType = ElementHandleList |
using | ItemHandleType = ElementHandle |
using | size_type = MeshModelInterface::size_type |
using | StateHandleListType = ElementStateHandleList |
using | StateHandleType = ElementStateHandle |
Static Public Member Functions inherited from MeshElementsInterface | |
static MeshElementsInterface & | getNullMeshElementsInterface () |
Hdf5MeshElementsInterface | ( | const Mesh::ElementType::Type & | type | ) |
|
default |
|
override |
|
overrideprotectedvirtual |
name | Name of the state |
defaultValue | A default value for this state |
Derived classes must implement this method, returning the handle they will use to refer to this state. name and defaultValue are only passed to the derived class in case it also wants to do something with these parameters. The base class already stores these so most implementations will probably ignore them and simply worry about the handle.
Implements MeshElementsInterface.
|
overrideprotectedvirtual |
Implements MeshElementsInterface.
|
overrideprotectedvirtual |
Reimplemented from MeshElementsInterface.
|
overridevirtual |
Clears all element data. Defined states must be removed separately via removeAllStates.
Implements MeshElementsInterface.
|
overrideprotectedvirtual |
Reimplemented from MeshElementsInterface.
|
protected |
state |
|
protected |
state |
|
protected |
state |
|
protected |
state |
|
protected |
state |
|
overridevirtual |
Implements MeshElementsInterface.
|
overridevirtual |
element | The element handle we're requesting the nodes for |
index | Which node of the given element is being requested |
Implements MeshElementsInterface.
|
override |
|
overridevirtual |
Convenience function for common type that avoids client needing to use a DataObject. This method still uses an internal TypedObject to call the implementations corresponding method unless the implementation overrides this virtual method and handles this type directly.
Reimplemented from MeshElementsInterface.
|
overridevirtual |
Convenience function for common type that avoids client needing to use a DataObject. This method still uses an internal TypedObject to call the implementations corresponding method unless the implementation overrides this virtual method and handles this type directly.
Reimplemented from MeshElementsInterface.
|
overridevirtual |
Convenience function for common type that avoids client needing to use a DataObject. This method still uses an internal TypedObject to call the implementations corresponding method unless the implementation overrides this virtual method and handles this type directly.
Reimplemented from MeshElementsInterface.
|
overridevirtual |
Convenience function for common type that avoids client needing to use a DataObject. This method still uses an internal TypedObject to call the implementations corresponding method unless the implementation overrides this virtual method and handles this type directly.
Reimplemented from MeshElementsInterface.
|
overridevirtual |
Convenience function for common type that avoids client needing to use a DataObject. This method still uses an internal TypedObject to call the implementations corresponding method unless the implementation overrides this virtual method and handles this type directly.
Reimplemented from MeshElementsInterface.
|
overrideprotectedvirtual |
elementHandle | The element we're requesting the state of |
state | The state we're requesting |
result | A DataObject to store the result in (must be of type state.getDataObject() unless the implementation can convert) |
Should be implmented as the const equivalent to getState()
This method is free to return shared data in result as it is only ever called by the public const getState method which will clone any shared data. As this is the case derived class should be able to implement the non-const getState() pure virtual as a simple call to this method as long as the only non-const thing this method does is return shared data.
Implements MeshElementsInterface.
|
overrideprotectedvirtual |
elementHandle | The element we're requesting the state of |
state | The state we're requesting |
result | A DataObject to store the result in (must be of type state.getDataObject() unless the implementation can convert) |
Implements MeshElementsInterface.
bool initialize | ( | hid_t & | file, |
const QString & | meshName, | ||
int | lod | ||
) |
file | The HDF5 that data will be read from as needed. |
meshName | The name of the mesh in the file that we are going to read from. |
lod | The LOD of the mesh that we are reading from. |
|
overridevirtual |
dataFactory | The DataFactory for the type of state we're checking support for |
Implements MeshElementsInterface.
bool loadNodeIndices | ( | const Mesh::ElementType::Type & | type | ) |
type | The type of elements that we're loading. |
Loads the node indices from the underlying HDF5 file for the elements of the specified type.
Hdf5MeshElementsInterface & operator= | ( | const Hdf5MeshElementsInterface & | other | ) |
|
overridevirtual |
Implements MeshElementsInterface.
|
overrideprotectedvirtual |
Derived classes must implement this method, deleting the state.
Implements MeshElementsInterface.
|
overridevirtual |
Default implementation does nothing
Reimplemented from MeshElementsInterface.
|
overridevirtual |
element | The element handle we're setting the nodes for |
node | The node to set |
index | The index to set the node for this element |
Implements MeshElementsInterface.
|
override |
|
overridevirtual |
elementHandle | The element we're setting the state of |
state | The state we're setting |
value | A DataObject containing the data to set (must be of type state.getDataObject() unless the implementation can convert) |
Implements MeshElementsInterface.
|
overridevirtual |
Convenience function for common type that avoids client needing to use a DataObject. This method still uses an internal TypedObject to call the implementations corresponding method unless the implementation overrides this virtual method and handles this type directly.
Reimplemented from MeshElementsInterface.
|
overridevirtual |
Convenience function for common type that avoids client needing to use a DataObject. This method still uses an internal TypedObject to call the implementations corresponding method unless the implementation overrides this virtual method and handles this type directly.
Reimplemented from MeshElementsInterface.
|
overridevirtual |
Convenience function for common type that avoids client needing to use a DataObject. This method still uses an internal TypedObject to call the implementations corresponding method unless the implementation overrides this virtual method and handles this type directly.
Reimplemented from MeshElementsInterface.
|
overridevirtual |
Convenience function for common type that avoids client needing to use a DataObject. This method still uses an internal TypedObject to call the implementations corresponding method unless the implementation overrides this virtual method and handles this type directly.
Reimplemented from MeshElementsInterface.
|
overridevirtual |
Convenience function for common type that avoids client needing to use a DataObject. This method still uses an internal TypedObject to call the implementations corresponding method unless the implementation overrides this virtual method and handles this type directly.
Reimplemented from MeshElementsInterface.
|
overridevirtual |
Implements MeshElementsInterface.