12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #ifndef CITY_H
- #define CITY_H
-
- #include <doublepoint.h>
- #include <QVector>
-
- ///
- /// \brief The City class
- /// This is merely a vector of points, i.e. the points that make up the
- /// polygon of the city.
-
- class City {
- public:
- QVector<DoublePoint> *geometry;
-
- /// \fn City()
- /// \~English
- /// \brief default constructor
- /// \~Spanish
- /// \brief default constructor
- ///
- City() {};
-
- /// \fn pushPoint(double x, double y)
- /// \~English
- /// \brief push a point to the vector of points
- /// \~Spanish
- /// \brief añadir un punto al final del vector de puntos
- ///
- void pushPoint(double x, double y);
-
- /// \fn getSize()
- /// \~English
- /// \brief get the size of the vector that contains the points
- /// \~Spanish
- /// \brief devuelve el tamaño del vector de puntos
- ///
- virtual int getSize() const { return geometry->size(); }
-
- /// \fn QVector<DoublePoint> *getGeometry()
- /// \~English
- /// \brief get a pointer to the vector of points
- /// \~Spanish
- /// \brief devuelve un puntero al vector de puntos
- ///
- QVector<DoublePoint> *getGeometry() const { return geometry; }
-
-
- /// \fn ~City()
- /// \~English
- /// \brief destructor
- /// \~Spanish
- /// \brief destructor
- ///
- ~City() {delete geometry; }
- };
-
- #endif // CITY_H
|