29template <
typename FIELD_ADD_ON_BASE_CLASS,
typename PIMPL_OBJ_TYPE=
void*>
48 getFieldAddOns().clear();
68 for (
size_t c=0; c < getFieldAddOns().size(); ++c){
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++){
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 for (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.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.