DPsim
Loading...
Searching...
No Matches
CPS::AttributeUpdateTask< DependentType, DependencyTypes > Class Template Reference

#include <Attribute.h>

Inheritance diagram for CPS::AttributeUpdateTask< DependentType, DependencyTypes >:
[legend]
Collaboration diagram for CPS::AttributeUpdateTask< DependentType, DependencyTypes >:
[legend]

Public Types

using Actor
 
- Public Types inherited from CPS::AttributeUpdateTaskBase< DependentType >
typedef std::shared_ptr< AttributeUpdateTaskBase< DependentType > > Ptr
 

Public Member Functions

 AttributeUpdateTask (UpdateTaskKind kind, Actor &actorFunction, typename Attribute< DependencyTypes >::Ptr... dependencies)
 
virtual void executeUpdate (std::shared_ptr< DependentType > &dependent) override
 
virtual AttributeBase::List getDependencies () override
 

Protected Attributes

std::tuple< typename Attribute< DependencyTypes >::Ptr... > mDependencies
 
Actor mActorFunction
 
UpdateTaskKind mKind
 

Additional Inherited Members

- Static Public Member Functions inherited from SharedFactory< AttributeUpdateTask< DependentType, DependencyTypes... > >
static std::shared_ptr< AttributeUpdateTask< DependentType, DependencyTypes... > > make (Args &&...args)
 

Detailed Description

template<class DependentType, class... DependencyTypes>
class CPS::AttributeUpdateTask< DependentType, DependencyTypes >

Specialized class for AttributeUpdateTasks that includes information about the types of attributes this task depends on.

Parameters
DependentTypeThe type of the attribute which is updated by this task
DependencyTypesList of the types of the attributes whose values are used to update the dependent attribute

Definition at line 195 of file Attribute.h.

Member Typedef Documentation

◆ Actor

template<class DependentType, class... DependencyTypes>
using CPS::AttributeUpdateTask< DependentType, DependencyTypes >::Actor
Initial value:
std::function<void(std::shared_ptr<DependentType> &,
typename Attribute<DependencyTypes>::Ptr...)>

Definition at line 201 of file Attribute.h.

Constructor & Destructor Documentation

◆ AttributeUpdateTask()

template<class DependentType, class... DependencyTypes>
CPS::AttributeUpdateTask< DependentType, DependencyTypes >::AttributeUpdateTask ( UpdateTaskKind kind,
Actor & actorFunction,
typename Attribute< DependencyTypes >::Ptr... dependencies )
inline

Definition at line 211 of file Attribute.h.

Member Function Documentation

◆ executeUpdate()

template<class DependentType, class... DependencyTypes>
virtual void CPS::AttributeUpdateTask< DependentType, DependencyTypes >::executeUpdate ( std::shared_ptr< DependentType > & dependent)
inlineoverridevirtual

Implements CPS::AttributeUpdateTaskBase< DependentType >.

Definition at line 218 of file Attribute.h.

◆ getDependencies()

template<class DependentType, class... DependencyTypes>
virtual AttributeBase::List CPS::AttributeUpdateTask< DependentType, DependencyTypes >::getDependencies ( )
inlineoverridevirtual

Returns all dependency elements in the mDependency tuple in a list over AttributeBase pointers.

Implements CPS::AttributeUpdateTaskBase< DependentType >.

Definition at line 227 of file Attribute.h.

Member Data Documentation

◆ mActorFunction

template<class DependentType, class... DependencyTypes>
Actor CPS::AttributeUpdateTask< DependentType, DependencyTypes >::mActorFunction
protected

Definition at line 207 of file Attribute.h.

◆ mDependencies

template<class DependentType, class... DependencyTypes>
std::tuple<typename Attribute<DependencyTypes>::Ptr...> CPS::AttributeUpdateTask< DependentType, DependencyTypes >::mDependencies
protected

Definition at line 206 of file Attribute.h.

◆ mKind

template<class DependentType, class... DependencyTypes>
UpdateTaskKind CPS::AttributeUpdateTask< DependentType, DependencyTypes >::mKind
protected

Definition at line 208 of file Attribute.h.


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