Diana Software
QEventList.hh
Go to the documentation of this file.
1 #ifndef _Q_REF_EVENTLIST_HH_
2 #define _Q_REF_EVENTLIST_HH_
14 #include <vector>
15 #include "QDiana.hh"
17 
18 class QEvent;
19 
21 {
22  public:
24  QEventList();
25 
27  ~QEventList();
28 
30  void Push(const QEvent* obj);
31 
33  void Pop();
34 
36  size_t Size() const { return fEvents.size(); }
37 
39  bool Empty() const { return fEvents.empty(); }
40 
42  void Clear() { fEvents.clear(); }
43 
45  const QEvent& operator[] (const size_t i);
46 
48  const QEvent& operator[] (const size_t i) const;
49 
50  private:
52  std::vector<const QEvent*> fEvents;
53 
54 
55 };
56 
57 
59 
60 
61 #endif
#define Q_END_NAMESPACE
Definition: QDiana.hh:22
#define Q_BEGIN_NAMESPACE
Definition: QDiana.hh:20
list of references to const QEvent (s)
Definition: QEventList.hh:21
QEventList()
constructor
Definition: QEventList.cc:9
void Pop()
remove the first QEvent in the list
Definition: QEventList.cc:22
bool Empty() const
check if the list is empty
Definition: QEventList.hh:39
void Clear()
reset list to 0 elements
Definition: QEventList.hh:42
std::vector< const QEvent * > fEvents
underlying vector of QEvent (s) references
Definition: QEventList.hh:52
~QEventList()
destructor
Definition: QEventList.cc:13
const QEvent & operator[](const size_t i)
operator[], if out of range throws an exception
Definition: QEventList.cc:38
void Push(const QEvent *obj)
add a QEvent
Definition: QEventList.cc:17
size_t Size() const
number of QEvent (s)
Definition: QEventList.hh:36
diana event
Definition: QEvent.hh:46