Bitstream Interpretation Library (BIL)  0.1
TileLookup2D.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 #ifndef BIL_TILELOOKUP2D_HPP
8 #define BIL_TILELOOKUP2D_HPP
9 
10 #include <cstring>
11 #include <vector>
12 
13 
14 namespace bil {
15 
16  class Device;
17  class Tile;
18 
19 
28  class TileLookup2D {
29  public:
30 
31  /**********************************************************************/
32  /* CONSTRUCTION / DESTRUCTION */
33  /**********************************************************************/
34 
38  TileLookup2D();
39 
40 
41  /**********************************************************************/
42  /* TILE LOOKUP */
43  /**********************************************************************/
44 
49  unsigned rowCount() const;
50 
55  unsigned columnCount() const;
56 
63  const Tile* lookup(unsigned row, unsigned column) const;
64 
65 
66  /**********************************************************************/
67  /* MODIFICATORS */
68  /**********************************************************************/
69 
74  void reset(const Device& device);
75 
79  void clear();
80 
81 
82  private:
83 
84  unsigned m_rowCount;
85  unsigned m_columnCount;
86  std::vector<const Tile*> m_tiles;
87 
88  };
89 
90 }
91 
92 #endif