00001 #ifndef HEADER_SHAPE_H 00002 #define HEADER_SHAPE_H 00003 00004 #include "NoCopy.h" 00005 #include "V2.h" 00006 00007 #include <string> 00008 #include <vector> 00009 00010 /** 00011 * Stores model shape. 00012 * It is uses by MarkMask to ask Field under shape. 00013 */ 00014 class Shape : public NoCopy { 00015 public: 00016 typedef std::vector<V2> t_marks; 00017 typedef t_marks::const_iterator const_iterator; 00018 private: 00019 t_marks m_marks; 00020 int m_w; 00021 int m_h; 00022 public: 00023 Shape(const std::string &shape); 00024 00025 const_iterator marksBegin() const { return m_marks.begin(); } 00026 const_iterator marksEnd() const { return m_marks.end(); } 00027 int getW() const { return m_w; } 00028 int getH() const { return m_h; } 00029 00030 std::string toString() const; 00031 }; 00032 00033 #endif