SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Go to the documentation of this file.
11 #ifndef smtk_task_Instances_h
12 #define smtk_task_Instances_h
14 #include "smtk/common/Instances.h"
15 #include "smtk/common/Managers.h"
18 #include "smtk/task/Task.h"
46 std::tuple<smtk::task::Task::Configuration&, std::shared_ptr<smtk::common::Managers>>,
48 smtk::task::Task::Configuration&,
49 smtk::task::Task::PassedDependencies,
50 std::shared_ptr<smtk::common::Managers>>>
69 WorkflowObservers& workflowObservers() {
return m_workflowObservers; }
76 bool pauseWorkflowNotifications(
bool doPause);
82 bool workflowEvent(
const std::set<Task*>& workflows,
WorkflowEvent event, Task* subject);
85 std::set<smtk::task::Task::Ptr> findByTitle(
const std::string& title)
const;
88 WorkflowObservers m_workflowObservers;
89 bool m_workflowNotificationsPaused =
false;
90 bool m_needNotification =
false;
96 #endif // smtk_task_Instances_h
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
std::function< void(const std::set< Task * > &, WorkflowEvent, Task *)> WorkflowObserver
The signature for observing workflow construction/destruction/modification.
Definition: Instances.h:61
@ Resuming
Notifications had been paused and now are not.
@ Created
A workflow has been created.
The Instances class is used to manage instances of objects which share an inherited base type (the Ba...
Definition: Instances.h:42
Track smtk::task::Task objects with smtk::common::Instances.
Definition: Instances.h:42
WorkflowEvent
An enum for events in the lifecycle of a workflow (tree of tasks).
Definition: Instances.h:26
@ TaskRemoved
A task has been removed from the workflow.
const WorkflowObservers & workflowObservers() const
Return the set of workflow-event observers (so you can add yourself to it).
Definition: Instances.h:68
Task is a base class for all SMTK tasks.
Definition: Task.h:69
@ Destroyed
The tasks in the workflow have become unmanaged or dependent on another workflow.
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
@ TaskAdded
A task has been added to the workflow.