MeVisLab Toolbox Reference
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{
38 public:
39
41 typedef enum {
42 AutoUpdateModeDoNothing = 0,
45 AutoUpdateModeCount
46 } AutoUpdateMode;
47
50
52 ~MergeLists() override;
53
57 void handleNotification (Field *field) override;
58
60 void activateAttachments () override;
61
63
64
65 protected:
66
77
80
84
87
90
93
96
98 BaseField *_fldInputList[2];
99
101
106
108
110 std::vector<ListBase::ActionClass> _listActionClassList[2];
111
113 std::vector<MLssize_t> _listActionIdList[2];
114
116 std::vector<MLssize_t> _listActionIndexList[2];
117
120 std::vector<MLssize_t> _inputItemIdList[2];
121
123 static const char* AutoUpdateModeNames[];
124
126
127 private:
128
131
132};
133
134
136
137
138#endif // __mlMergeLists_H
139
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:797
Field to encapsulate a boolean value.
Definition mlFields.h:58
Base class for all ML Engines which are derived from Module, which have no inputs or outputs and whic...
Definition mlEngine.h:30
Field to encapsulate an enumerated value.
Definition mlFields.h:195
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:659
#define ML_MODULE_CLASS_HEADER(className)
Like 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 which is a signed 32 bit size_t on 32 bit platforms and 64 bit one on 64 bit ...
Definition mlTypeDefs.h:566