ComponentMode.h
1 
27 #ifndef COSMO_COMPONENT_MODE_H
28 #define COSMO_COMPONENT_MODE_H
29 
30 #include <Pt/Cosmo/Api.h>
31 
32 namespace Pt {
33 
34 namespace Cosmo {
35 
45 {
46  public:
47  enum Mode
48  {
49  None = 0,
50  AutoStart = 1
51  };
52 
53  public:
54  ComponentMode(Mode m = None)
55  : _mode(m)
56  {}
57 
58  ComponentMode& operator=(Mode m)
59  {
60  _mode = m;
61  return *this;
62  }
63 
64  bool isAutoStart() const
65  { return (_mode & AutoStart) == AutoStart; }
66 
67  operator long() const
68  {
69  return _mode;
70  }
71 
72  private:
73  Mode _mode;
74 };
75 
76 } // namespace Cosmo
77 
78 } // namespace Pt
79 
80 #endif // include guard
Core module.
Definition: Allocator.h:33
Component flags.
Definition: ComponentMode.h:45