Workspace 6.21.5
|
Base class defining an interface for mapping a model's nodes to values.
#include <Mesh/DataStructures/nodemapper.h>
Public Member Functions | |
bool | canSerialize () const override |
NodeMapper * | clone () const override=0 |
virtual Application::Memento::Data * | createMementoData (const MeshModelInterface &model) const =0 |
virtual double | getValue (const NodeHandle &node, Application::Memento::Data &mementoData) const =0 |
bool | load (const DataExecution::SerializedItem &item) override |
void | logText (const QString &msg) const |
bool | save (DataExecution::SerializedItem &item) const override |
Public Member Functions inherited from Clonable | |
virtual | ~Clonable ()=default |
virtual Clonable * | clone () const =0 |
Public Member Functions inherited from Serialize | |
virtual | ~Serialize ()=default |
virtual bool | canSerialize () const =0 |
virtual bool | load (const SerializedItem &item)=0 |
virtual bool | save (SerializedItem &item) const =0 |
|
overridevirtual |
For objects that can be serialized, the save and load functions will be used to do the serialization. If this function returns false, both load() and save() must also return false.
Implements Serialize.
Reimplemented in NodeStateMapper, and NodeTextureMapper.
|
overridepure virtual |
Implements Clonable.
Implemented in NullNodeMapper, NodeScriptMapper, NodeStateMapper, and NodeTextureMapper.
|
pure virtual |
model | The model that will be used for mapping nodes to values. |
Implemented in NullNodeMapper, NodeScriptMapper, NodeStateMapper, and NodeTextureMapper.
|
pure virtual |
Implemented in NullNodeMapper, NodeScriptMapper, NodeStateMapper, and NodeTextureMapper.
|
overridevirtual |
item | Supplies the state to be loaded into this object. |
This function will load the state of this object from item. For many object types, this is most easily implemented in terms of the object's input operator (>>).
It would be reasonable for subclass implementations to assume that the data provided in item is in the same form as would have been saved from a call to save.
Implements Serialize.
Reimplemented in NodeStateMapper, and NodeTextureMapper.
void logText | ( | const QString & | msg | ) | const |
msg | The message to log. |
This function forwards the msg to the main application log stream.
|
overridevirtual |
item | Where to save the state of this object. |
This function will serialise the object by saving it to item. For most object types, this is most easily implemented in terms of the object's output operator (<<).
It is allowable for an object to only serialize part of itself. This would be useful if the data it represents has a set of defaults and only those values different to the defaults need to be serialized. Such an implementation then needs to be careful how it handles the complimentary load member function.
Implements Serialize.
Reimplemented in NodeStateMapper, and NodeTextureMapper.