Diana Software
QEventLabel.hh
Go to the documentation of this file.
1 #ifndef _Q_EVENTLABEL_HH_
2 #define _Q_EVENTLABEL_HH_
17 #include "QDiana.hh"
18 #include <string>
19 
21 
23 {
24  public:
26  QEventLabel() { owner = ""; name = "";}
27 
29  QEventLabel(const char* o, const char* n) : owner(o),name(n) {};
30 
32  QEventLabel(const std::string& o, const std::string& n) : owner(o),name(n) {};
33 
35  QEventLabel(const std::string& label);
36 
38  QEventLabel(const char* label);
39 
41  const QEventLabel& operator=(const std::string& label);
43  std::string GetStringLabel() const;
44 
46  operator std::string () const { return GetStringLabel(); }
47 
49  bool operator<(const QEventLabel& other) const;
50 
52  bool operator==(const QEventLabel& other) const;
53 
55  const std::string& GetOwner() const { return owner; }
57  const std::string& GetName() const { return name; }
58 
60  std::string owner;
62  std::string name;
63  private:
65  void Init(const std::string&);
66 
67 };
69 
70 #endif
#define Q_END_NAMESPACE
Definition: QDiana.hh:22
#define Q_BEGIN_NAMESPACE
Definition: QDiana.hh:20
label for QObject in the QEvent
Definition: QEventLabel.hh:23
std::string GetStringLabel() const
get string in the format "owner@name"
Definition: QEventLabel.cc:48
bool operator<(const QEventLabel &other) const
less operator
Definition: QEventLabel.cc:34
QEventLabel(const char *o, const char *n)
constructor
Definition: QEventLabel.hh:29
QEventLabel()
default constructor
Definition: QEventLabel.hh:26
const std::string & GetOwner() const
get owner
Definition: QEventLabel.hh:55
const std::string & GetName() const
get name
Definition: QEventLabel.hh:57
std::string owner
owner of the QObject
Definition: QEventLabel.hh:60
const QEventLabel & operator=(const std::string &label)
assignment operator
Definition: QEventLabel.cc:28
bool operator==(const QEventLabel &other) const
comparison operator
Definition: QEventLabel.cc:41
QEventLabel(const std::string &o, const std::string &n)
constructor
Definition: QEventLabel.hh:32
std::string name
name of the QObject
Definition: QEventLabel.hh:62
void Init(const std::string &)
function called in constructors
Definition: QEventLabel.cc:16