MeVisLab Toolbox Reference
mlEditObject.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_EDIT_OBJECT_H
14#define ML_EDIT_OBJECT_H
15
16
18
19#include "mlParserSystem.h"
20#include "mlEngine.h"
21#include "mlModuleIncludes.h"
22
23#include <string>
24
26
30 {
31 public:
32
34 typedef enum {
35 AutoUpdateModeDoNothing = 0,
38 AutoUpdateModeCount
39 } AutoUpdateMode;
40
43
45 ~EditObject() override;
46
48 virtual void deleteObject(void);
49
51 virtual int loadObject(void);
52
54 virtual int updateObject(void);
55
59
61
64
66
69
71
72 protected:
73
76 void activateAttachments() override;
77
79 void handleNotification (Field *field) override;
80
83
86
88 std::string _objectString;
89
90 private:
91
94
96 static const char* AutoUpdateModeNames[];
97
98 }; // class EditObject
99
101
102#endif
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:797
Class representing general ML objects that support import/export via strings (setPersistentState() an...
Definition mlBase.h:59
Field to encapsulate a boolean value.
Definition mlFields.h:58
allows to edit an ml::base-derived object via its XML description.
Base * _outputObject
object behind _fldBaseOutput
void handleNotification(Field *field) override
Handle field notifications.
StringField * _fldStatus
oper status
Base * _inputObject
object behind _fldBaseInput
BaseField * _fldBaseInput
Input connection.
BoolField * _fldAutoLoad
Auto-load input object on notify.
virtual int updateObject(void)
creates a new output object from the editor
virtual void deleteObject(void)
deletes the current output object
BaseField * _fldBaseOutput
Output connection.
EditObject()
constructor:
NotifyField * _fldDeleteButton
Delete output object.
StringField * _fldObjectString
String representation of object, and thus current editor state.
NotifyField * _fldLoadButton
Load input object to editor.
~EditObject() override
destructor:
NotifyField * _fldUpdateButton
Update output object.
std::string _objectString
current editor string
EnumField * _fldAutoUpdateMode
Auto-update mode. Use anything other than Auto-Delete with care.
virtual int loadObject(void)
loads the input object into editor
BoolField * _fldUpToDate
Indicates whether the current output is consistent with the editor representation.
void activateAttachments() override
resets fldUpToDate, calls handleNotification once after the module is loaded on the network and all f...
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
Field without value for notifications.
Definition mlFields.h:659
Field to encapsulate a string value.
Definition mlFields.h:610
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
#define PARSER_EXPORT
Definiert systemspezifische Macros, die f"ur diese DLL gelten sollen.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.