MeVisLabToolboxReference
|
Engine module MergeLists merging two BaseListTemplate-derived objects. More...
#include <mlMergeLists.h>
Public Types | |
enum | AutoUpdateMode { AutoUpdateModeDoNothing = 0, AutoUpdateModeAutoClear, AutoUpdateModeAutoUpdate, AutoUpdateModeCount } |
auto update mode enum More... | |
Public Member Functions | |
MergeLists () | |
Constructor. | |
~MergeLists () | |
Destructor. | |
Host communication | |
virtual void | handleNotification (Field *field) |
Handle field notifications. | |
virtual void | activateAttachments () |
Update fields after an initialization without handleNotification() called. | |
Protected Member Functions | |
void | _updateActionLists (int touchedList) |
Invoked by handleNotification(), assumes valid input lists! Determines whether a completely new output list is needed on the basis of (order indicates priority): 1. | |
void | _clearActionLists () |
clear all action lists | |
bool | _registerIdMapping (MLssize_t whichInList, MLssize_t inListId, MLssize_t outListId) |
registers the mapping of the item with id inListId of list whichInList to the item in the output list with id outListId. | |
void | _rebuildOutputListFromScratch () |
rebuilds from scratch, assumes valid input lists! | |
void | _modifyOutputList () |
relays stored events to the output list, assumes valid input lists! | |
void | _deleteOutputList () |
deletes the current output list | |
Protected Attributes | |
std::vector < ListBase::ActionClass > | _listActionClassList [2] |
remember action classes for each input list since last complete rebuild | |
std::vector< MLssize_t > | _listActionIdList [2] |
remember action IDs for each input list since last complete rebuild | |
std::vector< MLssize_t > | _listActionIndexList [2] |
remember action indices for each input list since last complete rebuild | |
std::vector< MLssize_t > | _inputItemIdList [2] |
Remember ids of each input list and their corresponding output ids. | |
bool | _needsCompleteRebuild |
flag indicating whether a new output list is needed | |
Field members | |
BaseField * | _fldOutputList |
Output list field, initialized by derived class. | |
BaseField * | _fldInputList [2] |
Input list fields, initialized by derived class. | |
NotifyField * | _fldUpdate |
Rebuild output list. | |
EnumField * | _fldAutoUpdateMode |
Determines auto-update mode. | |
NotifyField * | _fldClear |
Deletes the output object. | |
BoolField * | _fldAlwaysRebuild |
Always rebuild output list from scratch (instead of modifying it) | |
BoolField * | _fldNotifyForEachEvent |
Notify output list on each input list event (only for AutoApply and AlwaysRebuild OFF) | |
Static Protected Attributes | |
static const char * | AutoUpdateModeNames [] |
auto update mode tokens |
Engine module MergeLists merging two BaseListTemplate-derived objects.
Operator for merging two lists of the same arbitrary but BaseListTemplate-derived class. Currently only merge mode available is to append list1 at the end of list0. However, the output list is a new list object, and the input lists remain untouched.
Definition at line 43 of file mlMergeLists.h.
auto update mode enum
AutoUpdateModeDoNothing | |
AutoUpdateModeAutoClear | |
AutoUpdateModeAutoUpdate | |
AutoUpdateModeCount |
Definition at line 48 of file mlMergeLists.h.
ml::MergeLists::MergeLists | ( | ) |
Constructor.
ml::MergeLists::~MergeLists | ( | ) |
Destructor.
void ml::MergeLists::_clearActionLists | ( | ) | [protected] |
clear all action lists
void ml::MergeLists::_deleteOutputList | ( | ) | [protected] |
deletes the current output list
void ml::MergeLists::_modifyOutputList | ( | ) | [protected] |
relays stored events to the output list, assumes valid input lists!
void ml::MergeLists::_rebuildOutputListFromScratch | ( | ) | [protected] |
rebuilds from scratch, assumes valid input lists!
bool ml::MergeLists::_registerIdMapping | ( | MLssize_t | whichInList, |
MLssize_t | inListId, | ||
MLssize_t | outListId | ||
) | [protected] |
registers the mapping of the item with id inListId of list whichInList to the item in the output list with id outListId.
void ml::MergeLists::_updateActionLists | ( | int | touchedList | ) | [protected] |
Invoked by handleNotification(), assumes valid input lists! Determines whether a completely new output list is needed on the basis of (order indicates priority): 1.
_needsCompleteRebuild 2. _fldAlwaysRebuild 3. recorded list actions, IDs, indices If so, set _needsCompleteRebuild to true. If not, update action lists (ActSelect and ActNone will be ignored). at 3: A complete rebuild is indicated, if (a) any of the input list connection has been touched (removed/reconnected) (b) an ActNew or ActUnknown event occurred.
virtual void ml::MergeLists::activateAttachments | ( | ) | [virtual] |
Update fields after an initialization without handleNotification() called.
Reimplemented from ml::FieldContainer.
virtual void ml::MergeLists::handleNotification | ( | Field * | field | ) | [virtual] |
Handle field notifications.
Reimplemented from ml::Module.
BoolField* ml::MergeLists::_fldAlwaysRebuild [protected] |
Always rebuild output list from scratch (instead of modifying it)
Definition at line 111 of file mlMergeLists.h.
EnumField* ml::MergeLists::_fldAutoUpdateMode [protected] |
Determines auto-update mode.
Definition at line 109 of file mlMergeLists.h.
NotifyField* ml::MergeLists::_fldClear [protected] |
Deletes the output object.
Definition at line 110 of file mlMergeLists.h.
BaseField* ml::MergeLists::_fldInputList[2] [protected] |
Input list fields, initialized by derived class.
Definition at line 105 of file mlMergeLists.h.
BoolField* ml::MergeLists::_fldNotifyForEachEvent [protected] |
Notify output list on each input list event (only for AutoApply and AlwaysRebuild OFF)
Definition at line 112 of file mlMergeLists.h.
BaseField* ml::MergeLists::_fldOutputList [protected] |
Output list field, initialized by derived class.
Definition at line 104 of file mlMergeLists.h.
NotifyField* ml::MergeLists::_fldUpdate [protected] |
Rebuild output list.
Definition at line 107 of file mlMergeLists.h.
std::vector<MLssize_t> ml::MergeLists::_inputItemIdList[2] [protected] |
Remember ids of each input list and their corresponding output ids.
This is necessary because items removed due to overflow (ActInsertOvw) can only be found via their id.
Definition at line 127 of file mlMergeLists.h.
std::vector<ListBase::ActionClass> ml::MergeLists::_listActionClassList[2] [protected] |
remember action classes for each input list since last complete rebuild
Definition at line 117 of file mlMergeLists.h.
std::vector<MLssize_t> ml::MergeLists::_listActionIdList[2] [protected] |
remember action IDs for each input list since last complete rebuild
Definition at line 120 of file mlMergeLists.h.
std::vector<MLssize_t> ml::MergeLists::_listActionIndexList[2] [protected] |
remember action indices for each input list since last complete rebuild
Definition at line 123 of file mlMergeLists.h.
bool ml::MergeLists::_needsCompleteRebuild [protected] |
flag indicating whether a new output list is needed
Definition at line 132 of file mlMergeLists.h.
const char* ml::MergeLists::AutoUpdateModeNames[] [static, protected] |
auto update mode tokens
Definition at line 130 of file mlMergeLists.h.