MeVisLab Toolbox Reference
mlObjMgrFlags.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_OBJ_MGR_FLAGS_H
14 #define ML_OBJ_MGR_FLAGS_H
15 
16 
18 
19 #include "MLObjMgrSystem.h"
20 #include "mlTypeDefs.h"
21 
22 
23 ML_START_NAMESPACE
24 
27  class MLOBJMGR_EXPORT omFlags
28  {
29  public:
30 
32  enum NetCommMode {
33  NC_DEFAULT = 0,
36  NUM_NET_COMM_MODE_TYPES
37  };
38 
40  static const char *NetCommModeStrings[NUM_NET_COMM_MODE_TYPES];
41 
42  protected:
43 
44  bool _isDefault;
45 
46  bool _isPrivate;
49 
50  public:
51 
53  : _isDefault(true), _isPrivate(false), _isPersistent(true), _netCommMode(NC_DEFAULT) {}
54 
56  inline void markPrivate(bool trueOrFalse) {
57  _isDefault = false;
58  _isPrivate = trueOrFalse;
59  }
61  inline void markPersistent(bool trueOrFalse) {
62  _isDefault = false;
63  _isPersistent = trueOrFalse;
64  }
66  inline void setNetCommMode(NetCommMode netCommMode) {
67  _isDefault = false;
68  _netCommMode = netCommMode;
69  }
70 
72  inline bool isPrivate() const {
73  return _isPrivate;
74  }
76  inline bool isPersistent() const {
77  return _isPersistent;
78  }
80  inline NetCommMode getNetCommMode() const {
81  return _netCommMode;
82  }
83 
85  inline bool isDefault() const {
86  return _isDefault;
87  }
88  };
89 
90 ML_END_NAMESPACE
91 
92 #endif // __mlObjMgrFlags_H
Managed special flags of information address components.
Definition: mlObjMgrFlags.h:28
bool isDefault() const
Returns 'true' if none of the set/mark methods has been called.
Definition: mlObjMgrFlags.h:85
bool _isPersistent
Definition: mlObjMgrFlags.h:47
NetCommMode
Network communication modes.
Definition: mlObjMgrFlags.h:32
bool isPersistent() const
Retrieve whether or not an address component has been marked persistent.
Definition: mlObjMgrFlags.h:76
bool isPrivate() const
Retrieve whether or not an address component has been marked private.
Definition: mlObjMgrFlags.h:72
NetCommMode getNetCommMode() const
Retrieve network communication mode of the address component.
Definition: mlObjMgrFlags.h:80
NetCommMode _netCommMode
Definition: mlObjMgrFlags.h:48
void markPrivate(bool trueOrFalse)
Content changes do not generate an event if an address component has been marked private.
Definition: mlObjMgrFlags.h:56
void setNetCommMode(NetCommMode netCommMode)
Sets the network (TCP/IP) communication mode of the address component.
Definition: mlObjMgrFlags.h:66
void markPersistent(bool trueOrFalse)
An information item is stored (saved) in a file if all address components have been marked persistent...
Definition: mlObjMgrFlags.h:61