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

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

#include <ConfigureOperation.h>

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

Classes

struct  ParameterSet
 

Public Types

using Configuration = nlohmann::json
 
- 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
 

Public Member Functions

 smtkTypeMacro (smtk::task::adaptor::ConfigureOperation)
 
 smtkSuperclassMacro (smtk::task::Adaptor)
 
 smtkCreateMacro (smtk::task::Adaptor)
 
 ConfigureOperation ()
 Constructors.
 
 ConfigureOperation (const Configuration &config)
 
 ConfigureOperation (const Configuration &config, Task *from, Task *to)
 
bool updateDownstreamTask (State upstreamPrev, State upstreamNext) override
 Subclasses must override this method and respond to changes in the state of the upstream task as provided. More...
 
Configuration config () const
 
- 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)
 
bool buildInternalData ()
 Builds m_attributeSet and m_itemTable.
 
bool updateInternalData (const smtk::task::FillOutAttributes::AttributeSet &, const ParameterSet &)
 
bool setupAttributeObserver ()
 Creates signal observer.
 
bool updateOperation () const
 Copies items from FillOut task to SubmitOp task.
 
- Protected Member Functions inherited from smtk::task::Adaptor
void configureId (const Configuration &config)
 

Protected Attributes

std::vector< ParameterSetm_parameterSets
 Stores configuration data.
 
smtk::task::Task::Observers::Key m_taskObserver
 Observers for task state changes and attribute changes.
 
smtk::operation::Observers::Key m_attributeObserver
 
std::set< smtk::common::UUIDm_attributeSet
 Stores attributes (uuids) that are to be checked for changes.
 
std::vector< std::tuple< smtk::attribute::WeakAttributePtr, std::string, std::string > > m_itemTable
 Table listing <source attribute, source item path, operation parameter (item) path>
 
- 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
 

Detailed Description

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

Member Function Documentation

◆ updateDownstreamTask()

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

Subclasses must override this method and respond to changes in the state of the upstream task as provided.

Note this method replaces reconfigureTask() method which has been removed.

Implements smtk::task::Adaptor.


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