1 // Copyright (C) 2008, 2015 Ben Asselstine 2 // 3 // This program is free software; you can redistribute it and/or modify 4 // it under the terms of the GNU General Public License as published by 5 // the Free Software Foundation; either version 3 of the License, or 6 // (at your option) any later version. 7 // 8 // This program is distributed in the hope that it will be useful, 9 // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 // GNU Library General Public License for more details. 12 // 13 // You should have received a copy of the GNU General Public License 14 // along with this program; if not, write to the Free Software 15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 16 // 02110-1301, USA. 17 18 #pragma once 19 #ifndef NAMEDLOCATION_H 20 #define NAMEDLOCATION_H 21 22 #include "vector.h" 23 #include "Location.h" 24 #include "Namable.h" 25 26 class XML_Helper; 27 28 //! A game object that has a position and a name. 29 /** 30 * A NamedLocation is a game object on the map that has a position and a name. 31 * It also has a description. 32 */ 33 34 class NamedLocation: public Location, public Namable 35 { 36 public: 37 //! Default constructor. 38 NamedLocation(Vector<int> pos, guint32 size, Glib::ustring name, 39 Glib::ustring desc); 40 //! Copy constructor. 41 NamedLocation(const NamedLocation&); 42 43 NamedLocation(const NamedLocation&, Vector<int> pos); 44 45 //! Loading constructor. 46 NamedLocation(XML_Helper* helper, guint32 size); 47 48 //! Destructor. ~NamedLocation()49 virtual ~NamedLocation() {}; 50 getDescription()51 Glib::ustring getDescription() const {return d_description;}; 52 setDescription(Glib::ustring d)53 void setDescription(Glib::ustring d) {d_description = d;}; 54 55 private: 56 Glib::ustring d_description; 57 }; 58 59 #endif 60