MeVisLab Toolbox Reference
|
Class managing a list of FieldAddOns to simplify usage of multiple AddOns; AddOns are never owned by FieldAddOnList instances, this the life time of the AddOns must be longer than the usage of FieldAddOnList instances. More...
#include <mlFieldAddOnList.h>
Public Types | |
typedef std::vector< FIELD_ADD_ON_BASE_CLASS * > | FieldAddOnContainer |
The internally used container to manage the FieldAddOns. | |
Public Member Functions | |
FieldAddOnList (FieldContainer &fieldContainerRef) | |
Constructor, setting the reference of the FieldContainer managing the fields. | |
~FieldAddOnList () override | |
Destructor. | |
FieldAddOnContainer & | getFieldAddOns () |
Returns the referenced container. | |
const FieldAddOnContainer & | getFieldAddOns () const |
Returns the constant referenced container. | |
virtual void | registerFieldAddOn (FIELD_ADD_ON_BASE_CLASS *fieldAddOn) |
Register a FieldAddOn in *this; nullptr fieldAddOn pointers are ignored and not added. | |
virtual bool | hasFieldAddOn (FIELD_ADD_ON_BASE_CLASS *fieldAddOn) const |
Returns true if the passed fieldPtr is in _fieldPointers, otherwise false. | |
Redirecting standard FieldAddOnBase calls to all registered instances. | |
void | addFields () override |
Add fields to field container of module. | |
void | handleFieldActivationChanges () override |
Handle class changes according to Module::activateAttachments. | |
FieldAddOnBase::FieldChangeState | handleFieldChanges (Field *field) override |
Handle field notifications according to Module::handleNotification functionality. | |
Public Attributes | |
PIMPL_OBJ_TYPE | _pImpl |
User defined object not used in this base class (only default constructor is called), it is useful for private implementations. | |
Class managing a list of FieldAddOns to simplify usage of multiple AddOns; AddOns are never owned by FieldAddOnList instances, this the life time of the AddOns must be longer than the usage of FieldAddOnList instances.
It is implemented as template allowing to derive from differently typed FieldAddOn classes and it also allows the usage of a private implementation pointer which allows to hide collections of FieldAddOns inside the list implementations without needing to make them public. FIELD_ADD_ON_BASE_CLASS is expected to fulfil the behaviour of at least FieldAddOnBase.
Definition at line 30 of file mlFieldAddOnList.h.
typedef std::vector<FIELD_ADD_ON_BASE_CLASS*> ml::FieldAddOnList< FIELD_ADD_ON_BASE_CLASS, PIMPL_OBJ_TYPE >::FieldAddOnContainer |
The internally used container to manage the FieldAddOns.
Definition at line 35 of file mlFieldAddOnList.h.
|
inline |
Constructor, setting the reference of the FieldContainer managing the fields.
Definition at line 38 of file mlFieldAddOnList.h.
|
inlineoverride |
Destructor.
Definition at line 45 of file mlFieldAddOnList.h.
|
inlineoverride |
Add fields to field container of module.
All derived versions must add their fields to getFieldContainer() and with _addFieldPointer().
Definition at line 80 of file mlFieldAddOnList.h.
References mlrange_cast().
|
inline |
Returns the referenced container.
Definition at line 52 of file mlFieldAddOnList.h.
|
inline |
Returns the constant referenced container.
Definition at line 55 of file mlFieldAddOnList.h.
|
inlineoverride |
Handle class changes according to Module::activateAttachments.
Definition at line 87 of file mlFieldAddOnList.h.
References mlrange_cast().
|
inlineoverride |
Handle field notifications according to Module::handleNotification functionality.
The default functionality return
field | The field whose was changed. |
Definition at line 97 of file mlFieldAddOnList.h.
References mlrange_cast().
|
inlinevirtual |
Returns true if the passed fieldPtr is in _fieldPointers, otherwise false.
Definition at line 66 of file mlFieldAddOnList.h.
References mlrange_cast().
|
inlinevirtual |
Register a FieldAddOn in *this; nullptr fieldAddOn pointers are ignored and not added.
Definition at line 58 of file mlFieldAddOnList.h.
References mlrange_cast().
PIMPL_OBJ_TYPE ml::FieldAddOnList< FIELD_ADD_ON_BASE_CLASS, PIMPL_OBJ_TYPE >::_pImpl |
User defined object not used in this base class (only default constructor is called), it is useful for private implementations.
Definition at line 113 of file mlFieldAddOnList.h.