SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A base class for delegating session I/O. More...
#include <SessionIO.h>
Public Member Functions | |
smtkTypeMacroBase (SessionIO) | |
std::string | referencePath () const |
Return a reference directory to use during import/export. More... | |
void | setReferencePath (const std::string &p) |
Set the directory to use during import/export for creating relative paths. | |
Protected Attributes | |
std::string | m_referencePath |
A base class for delegating session I/O.
Sessions sometimes need to import and export additional state beyond a list of operations. For example, when it is not possible to store SMTK UUIDs as modeling-kernel-native attributes, the session may keep an array of UUIDs in order of iteration.
Sessions should not have methods tied to any particular format (e.g., JSON, XML, etc.); so we provide this base class. To use this class:
Note that the I/O format being handled will dictate additional subclass methods to be implemented.
|
inline |
Return a reference directory to use during import/export.
Any relative file or directory specification should be relative to this reference path. This is used during export to turn absolute paths into relative ones. It may be used during import to do the reverse.