Diana Software
QCachedEventList.hh
Go to the documentation of this file.
1 #ifndef _DYNAMIC_LIST_HH_
2 #define _DYNAMIC_LIST_HH_
3 
4 #include <deque>
5 #include <vector>
6 #include "QEventAssembler.hh"
7 
9 
11 {
12  public:
14 
16 
18  void Push(const QEvent& obj);
19 
21  void Pop();
22 
23 
24  size_t Size() const { return fIndexes.size(); }
25 
26  bool Empty() const { return fIndexes.empty(); }
27 
28  void Clear();
29 
30 
31  const QEventAssembler& operator[](const int i) const { return *fElements[ fIndexes[i] ]; }
32 
33  QEventAssembler& operator[](const int i) { return *fElements[ fIndexes[i] ]; }
34  const QEventAssembler& Back() const { return this->operator[](Size()-1); }
35  private:
36  std::deque<int> fIndexes;
37  std::deque<int> fFrees;
38  std::vector<QEventAssembler*> fElements;
39 };
40 
42 
43 #endif
#define Q_END_NAMESPACE
Definition: QDiana.hh:22
#define Q_BEGIN_NAMESPACE
Definition: QDiana.hh:20
void Push(const QEvent &obj)
const QEventAssembler & operator[](const int i) const
std::deque< int > fIndexes
std::deque< int > fFrees
bool Empty() const
QEventAssembler & operator[](const int i)
const QEventAssembler & Back() const
std::vector< QEventAssembler * > fElements
size_t Size() const
Visitor class of QEvent that provides full handling of QEvent.
diana event
Definition: QEvent.hh:46