initial commit, lordsawar source, slightly modified
[lordsawar] / src / NamedLocation.h
1 //  Copyright (C) 2008, 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 #ifndef NAMEDLOCATION_H
19 #define NAMEDLOCATION_H
20
21 #include <string>
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, std::string name, 
39                    std::string 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.
49     virtual ~NamedLocation();
50
51     std::string getDescription() const {return d_description;};
52  private:
53     std::string d_description;
54 };
55
56 #endif