Bitstream Interpretation Library (BIL)  0.1
V5CfgTileMap.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 #ifndef BIL_V5CFGTILEMAP_HPP
8 #define BIL_V5CFGTILEMAP_HPP
9 
10 #include <cstring>
11 #include <vector>
14 
15 
16 namespace bil {
17 
24  class V5CfgTileMap {
25  public:
26 
27  /**********************************************************************/
28  /* CONSTRUCTION / DESTRUCTION */
29  /**********************************************************************/
30 
34  V5CfgTileMap();
35 
36 
37  /**********************************************************************/
38  /* TILE ENTRY LOOKUP */
39  /**********************************************************************/
40 
45  unsigned rowCount() const;
46 
51  unsigned columnCount() const;
52 
60  V5CfgTileMapEntry& entries(unsigned row, unsigned column);
61 
69  const V5CfgTileMapEntry& entries(unsigned row, unsigned column) const;
70 
71 
72  /**********************************************************************/
73  /* MODIFICATORS */
74  /**********************************************************************/
75 
82  void resize(unsigned rowCount, unsigned columnCount);
83 
87  void clear();
88 
89 
90  private:
91 
92  friend void writeBinary(const V5CfgTileMap& data, std::ostream& outputStream);
93  friend void readBinary(V5CfgTileMap& data, std::istream& inputStream);
94 
95  unsigned m_rowCount;
96  unsigned m_columnCount;
97  std::vector<V5CfgTileMapEntry> m_entries;
98 
99  };
100 
101 }
102 
103 #endif