MeVisLab Toolbox Reference
mlSaveBase.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_SAVE_BASE_H
14 #define ML_SAVE_BASE_H
15 
16 
18 
19 #include "mlParserSystem.h"
20 #include "mlEngine.h"
21 #include "mlModuleIncludes.h"
22 
23 ML_START_NAMESPACE
24 
27  class PARSER_EXPORT SaveBase : public Engine
28  {
29  public:
30 
33 
35  virtual bool saveObject(void);
36 
47 
49 
50  protected:
51 
53  void handleNotification (Field *field) override;
54 
57 
58  private:
59 
62 
63  }; // class SaveBase
64 
65 ML_END_NAMESPACE
66 
67 #endif
Field to encapsulate a pointer to an ML base object.
Definition: mlFields.h:1187
Field to encapsulate a boolean value.
Definition: mlFields.h:62
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:363
Base class for all fields used in the ML.
Definition: mlField.h:73
Field without value for notifications.
Definition: mlFields.h:1049
saves an ml::base-derived object to a file class SaveBase
Definition: mlSaveBase.h:28
StringField * _fldSaveFileName
Name of the file the list is to be stored in.
Definition: mlSaveBase.h:39
BoolField * _fldUseSaveDir
Indicates whether the save dir field is used.
Definition: mlSaveBase.h:42
BoolField * _fldAllowOverwrite
Indicates whether the specified file is overwritten if it already exists.
Definition: mlSaveBase.h:46
BoolField * _fldUpToDate
If true, the last saved object file is still consistent with the current object.
Definition: mlSaveBase.h:45
BoolField * _fldAutoSave
Auto-saves the object each time the input is touched. Use with care.
Definition: mlSaveBase.h:44
void handleNotification(Field *field) override
Handle field notifications.
BaseField * _fldBaseInput
Input connection.
Definition: mlSaveBase.h:48
NotifyField * _fldSaveButton
Save list.
Definition: mlSaveBase.h:37
StringField * _fldNodeName
Name of the root node of the list when storing/restoring.
Definition: mlSaveBase.h:38
EnumField * _fldSaveMode
Specifies the storage format of the list.
Definition: mlSaveBase.h:43
virtual bool saveObject(void)
saves the input object to a file
SaveBase()
constructor
void _updateNodeName()
Reads a default node name from the input object (if present).
StringField * _fldSaveDirName
Name of the directory the file is to be stored in.
Definition: mlSaveBase.h:41
StringField * _fldFileStatus
Field for status messages concerning file I/O.
Definition: mlSaveBase.h:40
Field to encapsulate a string value.
Definition: mlFields.h:1000
#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.