Diana Software
QBool.hh
Go to the documentation of this file.
1 #ifndef _Q_BOOL_HH_
2 #define _Q_BOOL_HH_
3 
12 #include "QObject.hh"
13 #include <iostream>
14 
16 
17 class QBool : public QObject {
18 
19  public:
21  void Clear()
22  {
23  // mandatory method: reset members to default
25  }
26 
29  QBool() { Clear(); }
30 
31  QBool(const bool value) : QObject() { this->operator=(value); }
32 
33  QBool(const QBool& bt) : QObject() { *this=(bt); }
34 
35  const QBool& operator=(const bool value);
36 
37  bool operator==(const bool value) const;
38 
39  operator bool () const { return IsValid() && fValue; }
40 
41  void Dump(std::ostream& ob) const;
42  private:
43 
44  bool fValue;
45 
47 
48 };
49 
50 
51 
53 
54 bool operator==(const bool b,const Diana::QBool& qb);
55 
56 #endif
QVector b
Definition: CheckOF.C:21
Q_END_NAMESPACE bool operator==(const bool b, const Diana::QBool &qb)
Definition: QBool.cc:31
#define Q_END_NAMESPACE
Definition: QDiana.hh:22
#define Q_BOOL_DEFAULT
Definition: QDiana.hh:36
#define Q_BEGIN_NAMESPACE
Definition: QDiana.hh:20
bool wrapped into a QObject
Definition: QBool.hh:17
void Clear()
clear members
Definition: QBool.hh:21
const QBool & operator=(const bool value)
Definition: QBool.cc:7
QBool()
Definition: QBool.hh:29
QObjectDef(QBool, 2)
bool fValue
Definition: QBool.hh:44
bool operator==(const bool value) const
Definition: QBool.cc:15
void Dump(std::ostream &ob) const
print content to stream (intended for screen print or log files)
Definition: QBool.cc:20
QBool(const bool value)
Definition: QBool.hh:31
QBool(const QBool &bt)
Definition: QBool.hh:33
base class for objects handled by QEvent and QGlobalDataManager.
Definition: QObject.hh:76
bool IsValid() const
check wheter object is valid
Definition: QObject.hh:114