1 // Copyright (C) 2009 Ben Asselstine
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.
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.
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
26 //! A game object that refers to an owner
28 * An OwnerID is an object that refers to a particular player.
35 //! Default constructor.
36 OwnerId(guint32 owner);
39 OwnerId(const OwnerId&);
41 //! Loading constructor.
42 OwnerId(XML_Helper* helper);
49 guint32 getOwnerId() const {return d_owner_id;}
51 //! Return the Player who this id refers to
52 Player *getOwner() const ;
56 void setOwnerId(guint32 owner){d_owner_id = owner; owner_id_set = true;};
58 bool save(XML_Helper *helper) const;
62 //! Callback for loading an Ownable object from an opened saved-game file.
63 static OwnerId load(XML_Helper *helper);