DPsim
Loading...
Searching...
No Matches
CPS::AttributeBase Class Referenceabstract

#include <Attribute.h>

Inheritance diagram for CPS::AttributeBase:
[legend]

Public Types

typedef AttributePointer< AttributeBasePtr
 
typedef std::vector< PtrList
 
typedef std::set< Ptr, AttributeCmp< AttributeBase > > Set
 
typedef std::map< String, PtrMap
 

Public Member Functions

virtual String toString ()=0
 
virtual bool isStatic () const =0
 
virtual bool copyValue (AttributeBase::Ptr copyFrom)=0
 Copy the attribute value of copyFrom onto this attribute.
 
virtual const std::type_info & getType ()=0
 Get the type of this attribute.
 
virtual AttributeBase::Ptr cloneValueOntoNewAttribute ()=0
 Generates a new attribute of the same type and copies the current value in the heap. Does not copy any dependency relations!
 
virtual void appendDependencies (AttributeBase::Set *deps)=0
 
virtual AttributeBase::Set getDependencies () final
 

Detailed Description

Base class for all Attribute types. Can be used in STL containers to hide the template information.

Definition at line 120 of file Attribute.h.

Member Typedef Documentation

◆ List

typedef std::vector<Ptr> CPS::AttributeBase::List

Definition at line 123 of file Attribute.h.

◆ Map

typedef std::map<String, Ptr> CPS::AttributeBase::Map

Definition at line 125 of file Attribute.h.

◆ Ptr

◆ Set

typedef std::set<Ptr, AttributeCmp<AttributeBase> > CPS::AttributeBase::Set

Definition at line 124 of file Attribute.h.

Member Function Documentation

◆ appendDependencies()

virtual void CPS::AttributeBase::appendDependencies ( AttributeBase::Set * deps)
pure virtual

Append all dependencies of this attribute to the given set. For static attributes, this will only append this, for dynamic attributes, it will recursively collect and append all dependencies.

Implemented in CPS::AttributeDynamic< T >, and CPS::AttributeStatic< T >.

◆ cloneValueOntoNewAttribute()

virtual AttributeBase::Ptr CPS::AttributeBase::cloneValueOntoNewAttribute ( )
pure virtual

Generates a new attribute of the same type and copies the current value in the heap. Does not copy any dependency relations!

Returns
Pointer to the copied attribute

Implemented in CPS::Attribute< T >, CPS::Attribute< Bool >, CPS::Attribute< Complex >, CPS::Attribute< Int >, CPS::Attribute< Matrix >, CPS::Attribute< MatrixComp >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< Real > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< Real >, and CPS::Attribute< String >.

◆ copyValue()

virtual bool CPS::AttributeBase::copyValue ( AttributeBase::Ptr copyFrom)
pure virtual

◆ getDependencies()

virtual AttributeBase::Set CPS::AttributeBase::getDependencies ( )
inlinefinalvirtual

Get a set of all attributes this attribute depends on. For static attributes, this set will only contain this. For dynamic attributes, this will recursively collect all dependency attributes.

Definition at line 169 of file Attribute.h.

◆ getType()

◆ isStatic()

virtual bool CPS::AttributeBase::isStatic ( ) const
pure virtual

Check whether this is a static or dynamic attribute

Returns
true for instances of AttributeStatic, false for instances of AttributeDynamic

Implemented in CPS::AttributeDynamic< T >, and CPS::AttributeStatic< T >.

◆ toString()

virtual String CPS::AttributeBase::toString ( )
pure virtual

Display this attribute's value as a string

Implemented in CPS::Attribute< T >, CPS::Attribute< T >, CPS::Attribute< T >, CPS::Attribute< T >, CPS::Attribute< Bool >, CPS::Attribute< Bool >, CPS::Attribute< Bool >, CPS::Attribute< Bool >, CPS::Attribute< Bool >, CPS::Attribute< Bool >, CPS::Attribute< Bool >, CPS::Attribute< Complex >, CPS::Attribute< Complex >, CPS::Attribute< Complex >, CPS::Attribute< Complex >, CPS::Attribute< Complex >, CPS::Attribute< Complex >, CPS::Attribute< Complex >, CPS::Attribute< Int >, CPS::Attribute< Int >, CPS::Attribute< Int >, CPS::Attribute< Int >, CPS::Attribute< Int >, CPS::Attribute< Int >, CPS::Attribute< Int >, CPS::Attribute< Matrix >, CPS::Attribute< Matrix >, CPS::Attribute< Matrix >, CPS::Attribute< Matrix >, CPS::Attribute< Matrix >, CPS::Attribute< Matrix >, CPS::Attribute< Matrix >, CPS::Attribute< MatrixComp >, CPS::Attribute< MatrixComp >, CPS::Attribute< MatrixComp >, CPS::Attribute< MatrixComp >, CPS::Attribute< MatrixComp >, CPS::Attribute< MatrixComp >, CPS::Attribute< MatrixComp >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< Real > >, CPS::Attribute< MatrixVar< Real > >, CPS::Attribute< MatrixVar< Real > >, CPS::Attribute< MatrixVar< Real > >, CPS::Attribute< MatrixVar< Real > >, CPS::Attribute< MatrixVar< Real > >, CPS::Attribute< MatrixVar< Real > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< Real >, CPS::Attribute< Real >, CPS::Attribute< Real >, CPS::Attribute< Real >, CPS::Attribute< Real >, CPS::Attribute< Real >, CPS::Attribute< Real >, CPS::Attribute< String >, CPS::Attribute< String >, CPS::Attribute< String >, CPS::Attribute< String >, CPS::Attribute< String >, CPS::Attribute< String >, and CPS::Attribute< String >.


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