SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
10 #ifndef smtk_task_Worklet_h
11 #define smtk_task_Worklet_h
13 #include "smtk/resource/Component.h"
14 #include "smtk/resource/Resource.h"
16 #include "smtk/CoreExports.h"
18 #include "smtk/SystemConfig.h"
19 #include "smtk/common/Managers.h"
21 #include "nlohmann/json.hpp"
54 const std::shared_ptr<smtk::common::Managers>& managers =
nullptr);
70 std::string
name()
const override {
return m_name; }
73 const std::shared_ptr<resource::Resource> resource()
const override;
76 const std::string&
schema()
const {
return m_schema; }
87 const std::string&
description()
const {
return m_description; }
90 std::shared_ptr<Manager> manager()
const;
94 void setName(
const std::string& newName);
117 #endif // smtk_task_Worklet_h
std::string m_schema
Worklet's schema.
Definition: Worklet.h:101
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
int version() const
Return the version of the worklet.
Definition: Worklet.h:79
Gallery represents a map of tasks worklets.
Definition: Gallery.h:34
const std::string & description() const
Return the description of the worklet.
Definition: Worklet.h:87
std::string m_name
Worklet's name to present to the user.
Definition: Worklet.h:97
Worklet represents a set of tasks created to reuse a set of workflow logic in multiple workflows.
Definition: Worklet.h:38
std::weak_ptr< smtk::task::Manager > m_manager
If this worklet is being managed, this will refer to its manager.
Definition: Worklet.h:109
const Configuration & configuration() const
Return the worklet's configuration.
Definition: Worklet.h:63
A task manager is responsible for creating new tasks.
Definition: Manager.h:68
const std::string & operationName() const
Return the operation name to be used to instantiate the worklet If none is specified in the worklet's...
Definition: Worklet.h:84
#define smtkCreateMacro(...)
Add static create() methods to a class.
Definition: SharedFromThis.h:173
Configuration m_configuration
The JSON configuration of the worklet.
Definition: Worklet.h:111
std::string m_operationName
Worklet's operation name.
Definition: Worklet.h:105
#define smtkTypeMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:128
const std::string & schema() const
Return the schema used by the worklet.
Definition: Worklet.h:76
smtk::common::Singleton< detail::Manager > Manager
The Manager is a singleton interface for registering available plugins to manager instances.
Definition: Manager.h:92
#define smtkSuperclassMacro(...)
Add a typedef to the superclass of this class.
Definition: SharedFromThis.h:147
const common::UUID & id() const override
Set/get the worklet's unique identifier.
Definition: Worklet.h:66
Component is the base class for records stored in an smtk::resource::Resource.
Definition: Component.h:43
Macros for dealing with shared-pointer classes.
nlohmann::json Configuration
Worklets are configured with arbitrary JSON objects, though this may change.
Definition: Worklet.h:48
smtk::common::UUID m_id
Worklet's UUID.
Definition: Worklet.h:99
std::string m_description
Worklet's description string.
Definition: Worklet.h:107
std::string name() const override
Return the worklet's name.
Definition: Worklet.h:70