16#include <dpsim-models/Config.h>
26 using Ptr = std::shared_ptr<AttributeList>;
37 mAttributeMap[name] = newAttr;
46 mAttributeMap[name] = newAttr;
52 auto it = mAttributeMap.find(name);
53 if (it == mAttributeMap.end())
63 auto attrPtr = std::dynamic_pointer_cast<Attribute<T>>(attr.getPtr());
65 if (attrPtr ==
nullptr)
AttributePointer< AttributeBase > Ptr
std::map< String, Ptr > Map
AttributePointer< Attribute< T > > Ptr
Attribute< T >::Ptr createDynamic(const String &name)
Attribute< T >::Ptr create(const String &name, T intitialValue=T())
std::shared_ptr< AttributeList > Ptr
AttributeBase::Ptr attribute(const String &name) const
Return pointer to an attribute.
const AttributeBase::Map & attributes() const
Attribute< T >::Ptr attributeTyped(const String &name) const
Return pointer to an attribute.
static std::shared_ptr< T > make(Args &&...args)