iv::SharedAttr_I< T > Class Template Reference
#include <SharedAttr.hpp>
Public Member Functions | |
SharedAttr_I (ClientMarker *cm, AttributeEventProcessor *, T const &initial_value=T()) | |
Public Member Functions inherited from iv::Attr< T > | |
Attr (ClientMarker *, AttributeEventProcessor *, bool allow_ModifyMode) | |
T | Get () const |
void | Modify (ClientMarker *modifier, T const &) |
Public Member Functions inherited from iv::Attribute | |
Attribute (ClientMarker *, AttributeEventProcessor *event_processor, bool allow_ModifyMode) | |
ClientMarker * | owner () const |
std::type_index | Type () |
ValueMode | Mode () const |
std::any | GetAny () |
void | ModifyMode (ClientMarker *modifier, Attribute::ValueMode) |
void | ModifyAny (ClientMarker *modifier, std::any) |
void | Insert_Listener (AttributeListener *) |
void | Remove_Listener (AttributeListener *) |
Protected Member Functions | |
virtual void | GetSourceValue (T &out) const override |
virtual void | ModifySource (T const &) override |
Protected Member Functions inherited from iv::Attribute | |
void | SetAttributeMode (ValueMode) |
void | SourceValueChanged () |
AttributeEventProcessor * | event_processor () |
void | event_processor (AttributeEventProcessor *) |
void | Notify_Activated () |
void | Notify_Deactivated () |
bool | allow_ModifyMode () |
Additional Inherited Members | |
Public Types inherited from iv::Attribute | |
enum | ValueMode { ValueMode::Disabled, ValueMode::Value, ValueMode::ValueModify } |
Detailed Description
template<class T>
class iv::SharedAttr_I< T >
MAttr and GSAttr are designed to be used in models. Shared Attribute and local listeners storage.
Definition at line 13 of file SharedAttr.hpp.
Constructor & Destructor Documentation
◆ SharedAttr_I()
template<class T >
iv::SharedAttr_I< T >::SharedAttr_I | ( | ClientMarker * | cm, |
AttributeEventProcessor * | processor, | ||
T const & | initial_value = T() |
||
) |
Definition at line 6 of file SharedAttr.inl.
Member Function Documentation
◆ GetSourceValue()
template<class T >
|
overrideprotectedvirtual |
Implements iv::Attr< T >.
Definition at line 13 of file SharedAttr.inl.
◆ ModifySource()
template<class T >
|
overrideprotectedvirtual |
This should call Attr< T >::SourceValueChanged after the value is changed (can be skipped if value is the same or if the changes were not applied for some reason).
Implements iv::Attr< T >.
Definition at line 19 of file SharedAttr.inl.
The documentation for this class was generated from the following files:
- ivorium_core/Attribute/Attributes/SharedAttr.hpp
- ivorium_core/Attribute/Attributes/SharedAttr.inl