29template <
typename FIELD_ADD_ON_BASE_CLASS,
typename PIMPL_OBJ_TYPE=
void*>
39 FIELD_ADD_ON_BASE_CLASS(fieldContainerRef),
48 getFieldAddOns().clear();
61 getFieldAddOns().push_back(fieldAddOn);
68 for (
size_t c=0; c < getFieldAddOns().size(); ++c){
69 if (getFieldAddOns()[c] == fieldAddOn){
82 auto it = _fieldAddOns.begin();
83 for (; it != getFieldAddOns().end(); it++){ (*it)->addFields(); }
89 auto it = getFieldAddOns().begin();
90 for (; it != getFieldAddOns().end(); it++){ (*it)->handleFieldActivationChanges(); }
101 auto it = _fieldAddOns.begin();
102 for (; it != getFieldAddOns().end(); it++){
105 retVal = FieldAddOnBase::getMergedFieldChangeState(currState, retVal);
FieldChangeState
Describes the type of a field changes detected in handleFieldChanges(Field *field).
Class managing a list of FieldAddOns to simplify usage of multiple AddOns; AddOns are never owned by ...
void addFields() override
Add fields to field container of module.
void handleFieldActivationChanges() override
Handle class changes according to Module::activateAttachments.
FieldAddOnList(FieldContainer &fieldContainerRef)
Constructor, setting the reference of the FieldContainer managing the fields.
FieldAddOnContainer & getFieldAddOns()
Returns the referenced container.
FieldAddOnBase::FieldChangeState handleFieldChanges(Field *field) override
Handle field notifications according to Module::handleNotification functionality.
virtual bool hasFieldAddOn(FIELD_ADD_ON_BASE_CLASS *fieldAddOn) const
Returns true if the passed fieldPtr is in _fieldPointers, otherwise false.
const FieldAddOnContainer & getFieldAddOns() const
Returns the constant referenced container.
~FieldAddOnList() override
Destructor.
std::vector< FIELD_ADD_ON_BASE_CLASS * > FieldAddOnContainer
The internally used container to manage the FieldAddOns.
virtual void registerFieldAddOn(FIELD_ADD_ON_BASE_CLASS *fieldAddOn)
Register a FieldAddOn in *this; nullptr fieldAddOn pointers are ignored and not added.
PIMPL_OBJ_TYPE _pImpl
User defined object not used in this base class (only default constructor is called),...
Defines the class FieldContainer to encapsulate a vector of fields (see class Field).
Base class for all fields used in the ML.
Header file of the abstract base class FieldAddOnBase managing fields independently of an ML Module.