SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A base class for delegating session I/O to/from JSON. More...
#include <SessionIOJSON.h>
Public Types | |
using | json = nlohmann::json |
Public Member Functions | |
smtkTypeMacro (SessionIOJSON) | |
smtkCreateMacro (SessionIOJSON) | |
![]() | |
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. | |
Static Public Member Functions | |
static json | saveJSON (const smtk::model::ResourcePtr &rsrc) |
Serialize a resource into a set of JSON records. | |
static bool | saveModelRecords (const json &j, const std::string &url) |
Write a set of JSON records to the given location. | |
static json | loadJSON (const std::string &filename) |
Load JSON from a file and parse it, but do nothing more. | |
static bool | loadModelRecords (const json &j, smtk::model::ResourcePtr rsrc) |
Given JSON data, attempt to deserialize SMTK model records from it. More... | |
Additional Inherited Members | |
![]() | |
std::string | m_referencePath |
A base class for delegating session I/O to/from JSON.
Subclasses should implement both importJSON and exportJSON methods.
|
static |
Given JSON data, attempt to deserialize SMTK model records from it.
If the JSON object represents model data, it is added to the given resource.