SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
smtk::task::adaptor::ResourceAndRole Class Reference

Configure a task with a resource and role given a dependent producer. More...

#include <ResourceAndRole.h>

Inheritance diagram for smtk::task::adaptor::ResourceAndRole:
[legend]
Collaboration diagram for smtk::task::adaptor::ResourceAndRole:
[legend]

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::UUIDid () 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...
 
Taskfrom () const
 The task this adaptor uses to fetch configuration parameters.
 
Taskto () 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)
 
ResourceparentResource () const override
 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.
 
Linkslinks () override
 Return the links that connect this component to external resources/components.
 
const Linkslinks () const override
 
Propertiesproperties () override
 Return properties defined on this component.
 
const Propertiesproperties () 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
 
Taskm_from { nullptr }
 
Taskm_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
 

Detailed Description

Configure a task with a resource and role given a dependent producer.

Member Function Documentation

◆ updateDownstreamTask()

bool smtk::task::adaptor::ResourceAndRole::updateDownstreamTask ( State  upstreamPrev,
State  upstreamNext 
)
overridevirtual

Reconfigure the "to()" task.

This method is called when the "from()" task changes state.

Implements smtk::task::Adaptor.


The documentation for this class was generated from the following files: