49 inline std::vector<Field*> &
getFields() {
return _fieldPointers; }
52 inline const std::vector<Field*> &
getFields()
const {
return _fieldPointers; }
67 return hasField(
field) ? RecalculationRequired : NoChange;
74 if ((
state1 == RecalculationRequired) || (
state2 == RecalculationRequired)){
75 return RecalculationRequired;
77 else if ((
state1 == StatusOnlyChange) || (
state2 == StatusOnlyChange)){
78 return StatusOnlyChange;
98 std::vector<Field*> _fieldPointers;
Abstract base class for field interfaces to be added to other ML module classes.
const std::vector< Field * > & getFields() const
Return constant access to the list of managed fields!
void _addFieldPointer(Field *field)
Helper routine to add a Field pointer to _fieldPointers, empty pointers and pointers added more than ...
virtual void handleFieldActivationChanges()
Handle class changes according to Module::activateAttachments.
virtual FieldChangeState handleFieldChanges(Field *field)
Handle field notifications according to Module::handleNotification functionality.
virtual ~FieldAddOnBase()
Destructor.
const FieldContainer & getFieldContainer() const
Returns the referenced container.
FieldChangeState
Describes the type of a field changes detected in handleFieldChanges(Field *field).
virtual FieldChangeState getMergedFieldChangeState(FieldChangeState state1, FieldChangeState state2) const
Returns a FieldChangeState which best represents a merge of the two given states.
virtual bool hasField(Field *field) const
Returns true if the passed fieldPtr is in _fieldPointers, otherwise false.
virtual void addFields()=0
Add fields to field container of module.
FieldAddOnBase(FieldContainer &fieldContainerRef)
Constructor, setting the reference of the FieldContainer managing the fields.
std::vector< Field * > & getFields()
Return modification access to the list of managed fields, use at own risk!
FieldContainer & getFieldContainer()
Returns the referenced container.
Defines the class FieldContainer to encapsulate a vector of fields for (see class Field).
Base class for all fields used in the ML.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.