MeVisLabToolboxReference
MeVisLab/Standard/Sources/ML/MLBase/mlMergeLists.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00004 
00010 //----------------------------------------------------------------------------------
00011 
00012 
00013 
00014 #ifndef __mlMergeLists_H
00015 #define __mlMergeLists_H
00016 
00017 
00018 // ML includes
00019 #ifndef __mlModuleIncludes_H
00020 #include "mlModuleIncludes.h"
00021 #endif
00022 #ifndef __mlEngine_H
00023 #include "mlEngine.h"
00024 #endif
00025 
00026 // local includes
00027 #ifndef __mlBaseInit_H
00028 #include "mlBaseInit.h"
00029 #endif
00030 #ifndef __mlListBase_H
00031 #include "mlListBase.h"
00032 #endif
00033 
00034 
00035 ML_START_NAMESPACE
00036 
00037 //--------------------------------------------------------------------------------------
00042 //--------------------------------------------------------------------------------------
00043 class MLBASEEXPORT MergeLists : public Engine
00044 {
00045   public:
00046       
00048       typedef enum {
00049           AutoUpdateModeDoNothing = 0,
00050               AutoUpdateModeAutoClear,
00051               AutoUpdateModeAutoUpdate,
00052               AutoUpdateModeCount
00053       } AutoUpdateMode;
00054       
00056       MergeLists ();
00057       
00059       ~MergeLists();
00060       
00062 
00063 
00064       virtual void handleNotification (Field *field);
00065       
00067       virtual void activateAttachments ();
00068       
00070       
00071       
00072   protected:
00073       
00083       void _updateActionLists(int touchedList);
00084       
00086       void _clearActionLists();
00087       
00090       bool _registerIdMapping(MLssize_t whichInList, MLssize_t inListId, MLssize_t outListId);
00091       
00093       void _rebuildOutputListFromScratch();
00094       
00096       void _modifyOutputList();
00097       
00099       void _deleteOutputList();
00100       
00102 
00103       
00104       BaseField *_fldOutputList;            
00105       BaseField *_fldInputList[2];          
00106       
00107       NotifyField *_fldUpdate;              
00108       
00109       EnumField   *_fldAutoUpdateMode;      
00110       NotifyField *_fldClear;               
00111       BoolField   *_fldAlwaysRebuild;       
00112       BoolField   *_fldNotifyForEachEvent;  
00113       
00115       
00117       std::vector<ListBase::ActionClass>  _listActionClassList[2];
00118       
00120       std::vector<MLssize_t>              _listActionIdList[2];
00121       
00123       std::vector<MLssize_t>              _listActionIndexList[2];
00124       
00127       std::vector<MLssize_t>              _inputItemIdList[2];
00128       
00130       static const char* AutoUpdateModeNames[];
00131       
00132       bool _needsCompleteRebuild;       
00133       
00134   private:
00135       
00137       ML_MODULE_CLASS_HEADER(MergeLists);
00138       
00139 };
00140 
00141  
00142 ML_END_NAMESPACE
00143 
00144 
00145 #endif // __mlMergeLists_H
00146