DPsim
Public Types | Public Member Functions | List of all members
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. 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
 

Detailed Description

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.

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< 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 >.

◆ 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 193 of file Attribute.h.

◆ getType()

virtual const std::type_info& CPS::AttributeBase::getType ( )
pure virtual

◆ 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

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