Debian Codegraph @

src/level/Shape.h

raw
1 #ifndef HEADER_SHAPE_H
2 #define HEADER_SHAPE_H
3
4 #include "NoCopy.h"
5 #include "V2.h"
6
7 #include <string>
8 #include <vector>
9
10 /**
11 * Stores model shape.
12 * It is uses by MarkMask to ask Field under shape.
13 */
14 class Shape : public NoCopy {
15 public:
16 typedef std::vector<V2> t_marks;
17 typedef t_marks::const_iterator const_iterator;
18 private:
19 t_marks m_marks;
20 int m_w;
21 int m_h;
22 public:
23 Shape(const std::string &shape);
24
25 const_iterator marksBegin() const { return m_marks.begin(); }
26 const_iterator marksEnd() const { return m_marks.end(); }
27 int getW() const { return m_w; }
28 int getH() const { return m_h; }
29
30 std::string toString() const;
31 };
32
33 #endif