SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Stores UI state data for task UI classes. More...
#include <UIState.h>
Public Member Functions | |
void | setData (std::shared_ptr< smtk::task::Task > task, const nlohmann::json &j) |
Stores "ui" object for specified task. | |
nlohmann::json | getData (smtk::string::Token classToken, smtk::task::Task *task) const |
Returns "ui" data for given class and task. | |
void | setGenerator (const std::string &className, std::shared_ptr< UIStateGenerator > generator) |
Stores generator for given class name. | |
void | updateJson (std::shared_ptr< smtk::task::Task > task, nlohmann::json &j) const |
Updates "ui" object to include data from all generators. | |
void | dump (std::ostream &os) |
Writes contents of "ui" objects stored for each task and class. | |
Protected Attributes | |
std::unordered_map< smtk::string::Token, std::unordered_map< smtk::string::Token, nlohmann::json > > | m_data |
Nested map of <<class>, <task_id, json>> for deserialized UI state data. | |
std::unordered_map< std::string, std::shared_ptr< UIStateGenerator > > | m_generators |
Map of <classname, generator> for serializing UI state data. | |
Stores UI state data for task UI classes.