DPsim
Public Types | Public Member Functions | List of all members
CPS::AttributeList Class Reference

Base class of objects having attributes to access member variables. More...

#include <AttributeList.h>

Inheritance diagram for CPS::AttributeList:
[legend]
Collaboration diagram for CPS::AttributeList:
[legend]

Public Types

using Ptr = std::shared_ptr< AttributeList >
 

Public Member Functions

const AttributeBase::Map & attributes () const
 
template<typename T >
Attribute< T >::Ptr create (const String &name, T intitialValue=T())
 
template<typename T >
Attribute< T >::Ptr createDynamic (const String &name)
 
AttributeBase::Ptr attribute (const String &name) const
 Return pointer to an attribute.
 
template<typename T >
Attribute< T >::Ptr attributeTyped (const String &name) const
 Return pointer to an attribute.
 

Additional Inherited Members

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

Detailed Description

Base class of objects having attributes to access member variables.

Definition at line 20 of file AttributeList.h.

Member Function Documentation

◆ create()

template<typename T >
Attribute<T>::Ptr CPS::AttributeList::create ( const String &  name,
intitialValue = T() 
)
inline

Creates a new static Attribute and enters a pointer to it into this Attribute Map using the provided name.

Definition at line 36 of file AttributeList.h.

◆ createDynamic()

template<typename T >
Attribute<T>::Ptr CPS::AttributeList::createDynamic ( const String &  name)
inline

Creates a new dynamic Attribute and enters a pointer to it into this Attribute Map using the provided name.

Definition at line 47 of file AttributeList.h.


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