VPTissue Reference Manual
|
Interface for objects that have non-critical state (metadata) information representable as a ptree. More...
#include <IHasPTreeState.h>
Public Member Functions | |
virtual boost::property_tree::ptree | GetPTreeState () const =0 |
Return (possibly empty) ptree containing information about the current state of the object. More... | |
virtual void | SetPTreeState (const boost::property_tree::ptree &)=0 |
Set state of the object. More... | |
Interface for objects that have non-critical state (metadata) information representable as a ptree.
Typically used for remembering non-critical information, such as user interface layout, between sessions.
Definition at line 32 of file IHasPTreeState.h.
|
pure virtual |
Return (possibly empty) ptree containing information about the current state of the object.
Returned ptree can be used as parameter for SetPTreeState at a later point in time.
Implemented in SimShell::Gui::PTreeContainer, SimShell::Gui::Controller::ProjectController, SimShell::Gui::Controller::WorkspaceController, SimShell::Gui::PTreeEditorWindow, SimShell::Gui::Controller::AppController, SimShell::Gui::MyDockWidget, and SimShell::Gui::MyTreeView.
|
pure virtual |
Set state of the object.
Argument should be a ptree retrieved by GetPTreeState at an earlier moment in time.
Implementation should be able to deal with missing information, e.g. a missing subtree should not cause this method to throw an error. An empty ptree as parameter should cause nothing to happen.
The setting of the ptree state of an object must only serve as an enhancement to the usability of the program.
Implemented in SimShell::Gui::Controller::ProjectController, SimShell::Gui::PTreeContainer, SimShell::Gui::PTreeEditorWindow, SimShell::Gui::Controller::WorkspaceController, SimShell::Gui::Controller::AppController, SimShell::Gui::MyDockWidget, and SimShell::Gui::MyTreeView.