SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
11 #ifndef smtk_task_Manager_h
12 #define smtk_task_Manager_h
14 #include "smtk/CoreExports.h"
18 #include "smtk/common/Managers.h"
20 #include "smtk/string/Token.h"
22 #include "smtk/task/Active.h"
23 #include "smtk/task/Adaptor.h"
25 #include "smtk/task/Task.h"
26 #include "smtk/task/UIState.h"
29 #include "nlohmann/json.hpp"
34 #include <type_traits>
55 void operator=(
const Manager&) =
delete;
64 const TaskInstances& taskInstances()
const {
return m_taskInstances; }
68 const Active& active()
const {
return m_active; }
77 const AdaptorInstances& adaptorInstances()
const {
return m_adaptorInstances; }
80 smtk::common::Managers::Ptr
managers()
const {
return m_managers.lock(); }
81 void setManagers(
const smtk::common::Managers::Ptr& managers) { m_managers = managers; }
85 nlohmann::json getStyles()
const {
return m_styles; };
86 void setStyles(
const nlohmann::json& styles) { m_styles = styles; }
92 TaskInstances m_taskInstances;
93 AdaptorInstances m_adaptorInstances;
95 std::weak_ptr<smtk::common::Managers> m_managers;
96 nlohmann::json m_styles;
102 #endif // smtk_task_Manager_h
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
Stores UI state data for task UI classes.
Definition: UIState.h:31
AdaptorInstances & adaptorInstances()
Return the set of managed adaptor instances.
Definition: Manager.h:76
Active & active()
Return a tracker for the active task.
Definition: Manager.h:67
The Instances class is used to manage instances of objects which share an inherited base type (the Ba...
Definition: Instances.h:42
A task manager is responsible for creating new tasks.
Definition: Manager.h:46
Track smtk::task::Task objects with smtk::common::Instances.
Definition: Instances.h:58
std::vector< smtk::model::Instance > Instances
Definition: PublicPointerDefs.h:189
#define smtkCreateMacro(...)
Add static create() methods to a class.
Definition: SharedFromThis.h:113
#define smtkEnableSharedPtr(...)
An abbreviation for enabling shared pointers.
Definition: SharedFromThis.h:154
A string token identified by an integer.
Definition: Token.h:30
smtk::common::Instances< smtk::task::Adaptor, void, std::tuple< smtk::task::Adaptor::Configuration & >, std::tuple< smtk::task::Adaptor::Configuration &, smtk::task::Task *, smtk::task::Task * > > Instances
Track smtk::task::Adaptor objects with smtk::common::Instances.
Definition: Instances.h:39
smtk::common::Managers::Ptr managers() const
Return the managers instance that contains this manager, if it exists.
Definition: Manager.h:80
UIState & uiState()
Store geometry changes from UI components.
Definition: Manager.h:89
TaskInstances & taskInstances()
Return the set of managed task instances.
Definition: Manager.h:63
Macros for dealing with shared-pointer classes.
#define smtkTypeMacroBase(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:55
This object provides applications a way to change and observe the active task.
Definition: Active.h:37