Quark  0.1
ScopedBool.h++
Go to the documentation of this file.
1 #ifndef __libquark_util_ScopedBool_hxx
2 #define __libquark_util_ScopedBool_hxx
3 
4 namespace quark {
5 namespace util {
6 
14 {
15  public:
16 
21  ScopedBool(bool& value)
22  : _value(value)
23  { _value = true; }
24 
27  { _value = false; }
28 
29  private:
30 
31  bool& _value;
32 
33  Q_DISABLE_COPY(ScopedBool);
34 };
35 
36 } // namespace util
37 } // namespace quark
38 
39 #endif // __libquark_util_ScopedBool_hxx
ScopedBool(bool &value)
Constructs a new ScopedBool for the given value.
Definition: ScopedBool.h++:21
Definition: BarChartView.h++:6
~ScopedBool()
Destructor.
Definition: ScopedBool.h++:26
A simple wrapper object for a boolean value which sets the value to true in its constructor and to fa...
Definition: ScopedBool.h++:13
#define LIBQUARK_API
Definition: Quark.h++:18