MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
mlMergeLists.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef ML_MERGE_LISTS_H
14#define ML_MERGE_LISTS_H
15
16
18
19// ML includes
20#include "mlModuleIncludes.h"
21#include "mlEngine.h"
22
23
24#include "mlBaseInit.h"
25#include "mlListBase.h"
26
27
29
30//--------------------------------------------------------------------------------------
35//--------------------------------------------------------------------------------------
37{
38public:
40 typedef enum {
41 AutoUpdateModeDoNothing = 0,
44 AutoUpdateModeCount
45 } AutoUpdateMode;
46
49
51 ~MergeLists() override;
52
57
59 void activateAttachments() override;
60
62
63
64protected:
75
78
82
85
88
91
94
96 BaseField* _fldInputList[2];
97
99
105
107
109 std::vector<ListBase::ActionClass> _listActionClassList[2];
110
112 std::vector<MLssize_t> _listActionIdList[2];
113
115 std::vector<MLssize_t> _listActionIndexList[2];
116
119 std::vector<MLssize_t> _inputItemIdList[2];
120
122 static const char* AutoUpdateModeNames[];
123
125
126private:
129};
130
131
133
134
135#endif // __mlMergeLists_H
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:813
Field to encapsulate a boolean value.
Definition mlFields.h:56
Base class for all ML Engines that are derived from Module, and have no inputs or outputs but impleme...
Definition mlEngine.h:30
Field to encapsulate an enumerated value.
Definition mlFields.h:185
Base class for all fields used in the ML.
Definition mlField.h:73
Engine module MergeLists merging two BaseListTemplate-derived objects.
void _updateActionLists(int touchedList)
Invoked by handleNotification(), assumes valid input lists! Determines whether a completely new outpu...
~MergeLists() override
Destructor.
NotifyField * _fldClear
Deletes the output object.
void activateAttachments() override
Update fields after an initialization without handleNotification() called.
EnumField * _fldAutoUpdateMode
Determines auto-update mode.
void handleNotification(Field *field) override
Called when any field data in the field container of this module is modified.
void _modifyOutputList()
relays stored events to the output list, assumes valid input lists!
void _deleteOutputList()
deletes the current output list
MergeLists()
Constructor.
BoolField * _fldNotifyForEachEvent
Notify output list on each input list event (only for AutoApply and AlwaysRebuild OFF)
NotifyField * _fldUpdate
Rebuild output list.
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...
BaseField * _fldOutputList
Output list field, initialized by derived class.
void _clearActionLists()
clear all action lists
void _rebuildOutputListFromScratch()
rebuilds from scratch, assumes valid input lists!
BoolField * _fldAlwaysRebuild
Always rebuild output list from scratch (instead of modifying it)
bool _needsCompleteRebuild
flag indicating whether a new output list is needed
Field without value for notifications.
Definition mlFields.h:687
#define ML_MODULE_CLASS_HEADER(className)
Similar to ML_CLASS_HEADER for the usage of derived classes from Module.
#define MLBASEEXPORT
defined Header file mlBaseInit.h
Definition mlBaseInit.h:22
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
SSIZE_T MLssize_t
The signed ML size type that is a signed 32-bit size_t on 32-bit platforms and 64-bit one on 64-bit p...
Definition mlTypeDefs.h:563