Diana Software
QBool.cc
Go to the documentation of this file.
1 #include "QBool.hh"
2 
3 QObjectImp(Diana::QBool);
4 
6 
7 const QBool& QBool::operator=(const bool value)
8 {
9  fValue = value;
10  Validate();
11  return *this;
12 }
13 
14 
15 bool QBool::operator==(const bool value) const
16 {
17  return (IsValid() && fValue) ==value;
18 }
19 
20 void QBool::Dump(std::ostream& ob) const
21 {
22  bool p = Q_BOOL_DEFAULT;
23  if(IsValid()) {
24  p = fValue;
25  ob<<(p ? "true": "false");
26  }
27 }
28 
30 
31 bool operator==(const bool b,const Diana::QBool& qb)
32 {
33  return qb == b;
34 }
QVector b
Definition: CheckOF.C:21
QObjectImp(Diana::QBool)
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
const QBool & operator=(const bool value)
Definition: QBool.cc:7
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
void Validate()
make object valid
Definition: QObject.hh:108
bool IsValid() const
check wheter object is valid
Definition: QObject.hh:114