DPsim
|
#include <Attribute.h>
Public Types | |
typedef AttributePointer< AttributeBase > | Ptr |
typedef std::vector< Ptr > | List |
typedef std::set< Ptr, AttributeCmp< AttributeBase > > | Set |
typedef std::map< String, Ptr > | Map |
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. More... | |
virtual const std::type_info & | getType ()=0 |
Get the type of this attribute. More... | |
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! More... | |
virtual void | appendDependencies (AttributeBase::Set *deps)=0 |
virtual AttributeBase::Set | getDependencies () final |
Base class for all Attribute types. Can be used in STL containers to hide the template information.
Definition at line 144 of file Attribute.h.
|
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 >.
|
pure virtual |
Generates a new attribute of the same type and copies the current value in the heap. Does not copy any dependency relations!
Implemented in CPS::Attribute< T >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< String >, CPS::Attribute< Int >, CPS::Attribute< Matrix >, CPS::Attribute< Bool >, CPS::Attribute< Complex >, CPS::Attribute< MatrixComp >, and CPS::Attribute< Real >.
|
pure virtual |
Copy the attribute value of copyFrom
onto this attribute.
Implemented in CPS::Attribute< T >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< String >, CPS::Attribute< Int >, CPS::Attribute< Matrix >, CPS::Attribute< Bool >, CPS::Attribute< Complex >, CPS::Attribute< MatrixComp >, and CPS::Attribute< Real >.
|
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 193 of file Attribute.h.
|
pure virtual |
Get the type of this attribute.
Implemented in CPS::Attribute< T >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< String >, CPS::Attribute< Int >, CPS::Attribute< Matrix >, CPS::Attribute< Bool >, CPS::Attribute< Complex >, CPS::Attribute< MatrixComp >, and CPS::Attribute< Real >.
|
pure virtual |
Check whether this is a static or dynamic attribute
AttributeStatic
, false for instances of AttributeDynamic
Implemented in CPS::AttributeDynamic< T >, and CPS::AttributeStatic< T >.
|
pure virtual |
Display this attribute's value as a string
Implemented in CPS::Attribute< T >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< String >, CPS::Attribute< Int >, CPS::Attribute< Matrix >, CPS::Attribute< Bool >, CPS::Attribute< Complex >, CPS::Attribute< MatrixComp >, CPS::Attribute< Real >, CPS::Attribute< T >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< String >, CPS::Attribute< Int >, CPS::Attribute< Matrix >, CPS::Attribute< Bool >, CPS::Attribute< Complex >, CPS::Attribute< MatrixComp >, CPS::Attribute< Real >, CPS::Attribute< T >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< String >, CPS::Attribute< Int >, CPS::Attribute< Matrix >, CPS::Attribute< Bool >, CPS::Attribute< Complex >, CPS::Attribute< MatrixComp >, CPS::Attribute< Real >, CPS::Attribute< T >, CPS::Attribute< MatrixVar< Complex > >, CPS::Attribute< MatrixVar< VarType > >, CPS::Attribute< String >, CPS::Attribute< Int >, CPS::Attribute< Matrix >, CPS::Attribute< Bool >, CPS::Attribute< Complex >, CPS::Attribute< MatrixComp >, and CPS::Attribute< Real >.