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

PortForwardingAgent verifies that attributes are valid. More...

#include <PortForwardingAgent.h>

Inheritance diagram for smtk::task::PortForwardingAgent:
[legend]
Collaboration diagram for smtk::task::PortForwardingAgent:
[legend]

Classes

struct  Forward
 A rule for forwarding data. More...
 
struct  ObjectFilter
 A filter for objects. More...
 

Public Types

using State = smtk::task::State
 
using Configuration = nlohmann::json
 
using RolesToFilters = std::unordered_map< smtk::string::Token, std::vector< ObjectFilter > >
 Map from role name (or "*") to an array of object filters.
 
- Public Types inherited from smtk::task::Agent
enum  CategoryEvaluation { CategoryEvaluation::Pass, CategoryEvaluation::Reject, CategoryEvaluation::Neutral }
 The set of values that an agent's acceptChildCategories method can return. More...
 
using State = smtk::task::State
 
using Configuration = nlohmann::json
 

Public Member Functions

 smtkSuperclassMacro (smtk::task::Agent)
 
 smtkTypeMacro (smtk::task::PortForwardingAgent)
 
 PortForwardingAgent (Task *owningTask)
 
State state () const override
 Return the current state of the agent. More...
 
void configure (const Configuration &config) override
 Configure the agent based on a provided JSON configuration.
 
Configuration configuration () const override
 Return the agent's current configuration for serialization.
 
std::shared_ptr< PortDataportData (const Port *port) const override
 Return the port data from the agent. More...
 
void portDataUpdated (const Port *port) override
 Tell the agent that the data on port has been updated. More...
 
- Public Member Functions inherited from smtk::task::Agent
 smtkTypeMacroBase (smtk::task::Agent)
 
 Agent (Task *owningTask)
 
Taskparent () const
 Return the agent's parent task.
 
virtual std::string troubleshoot () const
 Return a description of actions users must take to make the agent's state completable. More...
 
virtual bool getViewData (smtk::common::TypeContainer &configuration) const
 Insert view-related objects into configuration. More...
 
smtk::string::Token name () const
 Agents may have a name that can be used to distinguish them. More...
 
virtual CategoryEvaluation acceptsChildCategories (const std::set< std::string > &cats) const
 Evaluates a set of categories that are associated with potential children tasks.
 

Protected Attributes

std::vector< Forwardm_forwards
 
- Protected Attributes inherited from smtk::task::Agent
smtk::task::Taskm_parent
 
smtk::string::Token m_name
 A name that can be used to distinguish instances of agents.
 

Additional Inherited Members

- Protected Member Functions inherited from smtk::task::Agent
virtual void taskStateChanged (State prev, State &next)
 Receive notification the parent Task's state has changed.
 
virtual void taskStateChanged (Task *task, State prev, State next)
 Receive notification that a Task's state has changed. More...
 

Detailed Description

PortForwardingAgent verifies that attributes are valid.

Member Function Documentation

◆ portData()

std::shared_ptr< PortData > smtk::task::PortForwardingAgent::portData ( const Port port) const
overridevirtual

Return the port data from the agent.

If the agent is not assigned to port, the method returns nullptr.

Reimplemented from smtk::task::Agent.

◆ portDataUpdated()

void smtk::task::PortForwardingAgent::portDataUpdated ( const Port port)
overridevirtual

Tell the agent that the data on port has been updated.

This assumes that port is an input port of the task and forces portDataUpdated() to be called on each downstream of port.

Reimplemented from smtk::task::Agent.

◆ state()

State smtk::task::PortForwardingAgent::state ( ) const
overridevirtual

Return the current state of the agent.

This is Unavailable when no resources/attributes/definitions have been configured for validation; it is Incomplete when at least one attribute is configured for validation but is not in a valid state; and Completable when all the configured attributes are valid.

Implements smtk::task::Agent.


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