SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Configure a task with a resource and role given a dependent producer. More...
#include <ResourceAndRole.h>
Public Member Functions | |
smtkTypeMacro (smtk::task::adaptor::ResourceAndRole) | |
smtkSuperclassMacro (smtk::task::Adaptor) | |
smtkCreateMacro (smtk::task::Adaptor) | |
ResourceAndRole () | |
Construct an unconfigured adaptor. | |
ResourceAndRole (const Configuration &config) | |
ResourceAndRole (const Configuration &config, Task *from, Task *to) | |
bool | updateDownstreamTask (State upstreamPrev, State upstreamNext) override |
Reconfigure the "to()" task. More... | |
Public Member Functions inherited from smtk::task::Adaptor | |
smtkTypeMacro (smtk::task::Adaptor) | |
smtkSuperclassMacro (smtk::resource::Component) | |
smtkSharedFromThisMacro (smtk::resource::PersistentObject) | |
Adaptor () | |
Construct an unconfigured adaptor. | |
Adaptor (const Configuration &config) | |
Adaptor (const Configuration &config, Task *from, Task *to) | |
~Adaptor () override=default | |
Destructor must be virtual. | |
const smtk::resource::ResourcePtr | resource () const override |
Components are required to return their owning resource (if any). More... | |
std::string | name () const override |
Return the name of the object - by default it will return the UUID but that can be overridden. | |
const common::UUID & | id () const override |
Return a unique identifier for the object which will be persistent across sessions. | |
bool | setId (const common::UUID &uid) override |
Assign an ID to this object (used by readers; not for arbitrary reuse). More... | |
Task * | from () const |
The task this adaptor uses to fetch configuration parameters. | |
Task * | to () const |
The task to which this adaptor applies configuration parameters. | |
Public Member Functions inherited from smtk::resource::Component | |
smtkTypeMacro (smtk::resource::Component) | |
smtkSuperclassMacro (smtk::resource::PersistentObject) | |
smtkSharedFromThisMacro (smtk::resource::PersistentObject) | |
virtual Resource * | parentResource () const |
Return a raw (not shared) pointer to the resource that owns this component. More... | |
template<typename ResourceType > | |
ResourceType * | parentResourceAs () const |
This variant of parentResource casts the result to the given ResourceType. | |
Links & | links () override |
Return the links that connect this component to external resources/components. | |
const Links & | links () const override |
Properties & | properties () override |
Return properties defined on this component. | |
const Properties & | properties () const override |
Public Member Functions inherited from smtk::resource::PersistentObject | |
smtkTypeMacroBase (smtk::resource::PersistentObject) | |
template<typename T > | |
T::Ptr | as () |
Attempt to cast this object to a subclass. | |
template<typename T > | |
T::ConstPtr | as () const |
Attempt to cast this object to a subclass. | |
Protected Member Functions | |
void | configureSelf (const Configuration &config) |
Protected Member Functions inherited from smtk::task::Adaptor | |
void | configureId (const Configuration &config) |
Protected Attributes | |
std::string | m_fromTag |
std::string | m_toTag |
Protected Attributes inherited from smtk::task::Adaptor | |
smtk::common::UUID | m_id |
Task * | m_from { nullptr } |
Task * | m_to { nullptr } |
smtk::task::Task::Observers::Key | m_observer |
Additional Inherited Members | |
Public Types inherited from smtk::task::Adaptor | |
using | Configuration = nlohmann::json |
Task adaptors are configured using JSON. | |
Public Types inherited from smtk::resource::Component | |
typedef std::function< void(const ComponentPtr &)> | Visitor |
typedef detail::ComponentLinks | Links |
typedef detail::ComponentProperties | Properties |
Configure a task with a resource and role given a dependent producer.
|
overridevirtual |
Reconfigure the "to()" task.
This method is called when the "from()" task changes state.
Implements smtk::task::Adaptor.