MeVisLabToolboxReference
mlObjMgrFlags.h
Go to the documentation of this file.
1 // **InsertLicense** code
2 //-------------------------------------------------------------------------
5 
10 //-------------------------------------------------------------------------
11 
12 #ifndef __mlObjMgrFlags_H
13 #define __mlObjMgrFlags_H
14 
15 #include "MLObjMgrSystem.h"
16 #include "mlTypeDefs.h"
17 
18 
19 ML_START_NAMESPACE
20 
23  class MLOBJMGR_EXPORT omFlags
24  {
25  public:
26 
28  enum NetCommMode {
29  NC_DEFAULT = 0,
32  NUM_NET_COMM_MODE_TYPES
33  };
34 
36  static const char *NetCommModeStrings[NUM_NET_COMM_MODE_TYPES];
37 
38  protected:
39 
40  bool _isDefault;
41 
42  bool _isPrivate;
45 
46  public:
47 
49  : _isDefault(true), _isPrivate(false), _isPersistent(true), _netCommMode(NC_DEFAULT) {}
50 
52  inline void markPrivate(bool trueOrFalse) {
53  _isDefault = false;
54  _isPrivate = trueOrFalse;
55  }
57  inline void markPersistent(bool trueOrFalse) {
58  _isDefault = false;
59  _isPersistent = trueOrFalse;
60  }
62  inline void setNetCommMode(NetCommMode netCommMode) {
63  _isDefault = false;
64  _netCommMode = netCommMode;
65  }
66 
68  inline bool isPrivate() const {
69  return _isPrivate;
70  }
72  inline bool isPersistent() const {
73  return _isPersistent;
74  }
76  inline NetCommMode getNetCommMode() const {
77  return _netCommMode;
78  }
79 
81  inline bool isDefault() const {
82  return _isDefault;
83  }
84  };
85 
86 ML_END_NAMESPACE
87 
88 #endif // __mlObjMgrFlags_H
void markPrivate(bool trueOrFalse)
Content changes do not generate an event if an address component has been marked private.
Definition: mlObjMgrFlags.h:52
bool isPrivate() const
Retrieve whether or not an address component has been marked private.
Definition: mlObjMgrFlags.h:68
bool _isPersistent
Definition: mlObjMgrFlags.h:43
void setNetCommMode(NetCommMode netCommMode)
Sets the network (TCP/IP) communication mode of the address component.
Definition: mlObjMgrFlags.h:62
bool isPersistent() const
Retrieve whether or not an address component has been marked persistent.
Definition: mlObjMgrFlags.h:72
Header file containing the most important ML types, definitions; this file can be included without li...
NetCommMode
Network communication modes.
Definition: mlObjMgrFlags.h:28
bool isDefault() const
Returns 'true' if none of the set/mark methods has been called.
Definition: mlObjMgrFlags.h:81
Managed special flags of information address components.
Definition: mlObjMgrFlags.h:23
void markPersistent(bool trueOrFalse)
An information item is stored (saved) in a file if all address components have been marked persistent...
Definition: mlObjMgrFlags.h:57
NetCommMode _netCommMode
Definition: mlObjMgrFlags.h:44
NetCommMode getNetCommMode() const
Retrieve network communication mode of the address component.
Definition: mlObjMgrFlags.h:76