Diana Software
QString.hh
Go to the documentation of this file.
1 #ifndef _Q_STRING_HH_
2 #define _Q_STRING_HH_
3 
12 #include "QObject.hh"
13 #include <string>
14 #include <iostream>
15 
17 
18 class QString : public QObject {
19 
20  public:
22  void Clear()
23  {
24  // mandatory method: reset members to default
25  fValue.clear();
26  }
27 
29  QString() { fValue.clear(); }
30 
32  QString(const std::string& value) { this->operator=(value); }
33 
35  QString(const char* value) { this->operator=(value); }
36 
38  const QString& operator=(const std::string& value);
39 
41  const QString& operator=(const char* value);
42 
44  bool operator==(const std::string& value) const;
45 
47  operator const std::string& () const { return fValue; }
48 
50  const std::string& GetValue() const {return fValue; }
51 
53  void Dump(std::ostream& ob) const { ob<<fValue; }
54  private:
56  std::string fValue;
57 
58 
60 
61 };
62 
63 
64 
66 
67 //bool operator==(const bool b,const Diana::QString& qb);
68 
69 #endif
#define Q_END_NAMESPACE
Definition: QDiana.hh:22
#define Q_BEGIN_NAMESPACE
Definition: QDiana.hh:20
base class for objects handled by QEvent and QGlobalDataManager.
Definition: QObject.hh:76
string wrapped into a QObject
Definition: QString.hh:18
const QString & operator=(const std::string &value)
operator=
Definition: QString.cc:7
QObjectDef(QString, 1)
bool operator==(const std::string &value) const
operator==
Definition: QString.cc:21
QString(const char *value)
copy ctor
Definition: QString.hh:35
const std::string & GetValue() const
get value (for cint, were cast operator does not work)
Definition: QString.hh:50
void Clear()
clear members
Definition: QString.hh:22
QString()
default ctor
Definition: QString.hh:29
void Dump(std::ostream &ob) const
Dump content to stream.
Definition: QString.hh:53
QString(const std::string &value)
copy ctor
Definition: QString.hh:32
std::string fValue
value
Definition: QString.hh:56