~ubuntu-branches/ubuntu/raring/lordsawar/raring

« back to all changes in this revision

Viewing changes to src/signpostlist.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Barry deFreese, Gonéri Le Bouder
  • Date: 2008-06-17 11:15:26 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080617111526-yjyvu9df50zmpdo0
Tags: 0.0.9-1
[ Barry deFreese ]
* New upstream release.
  + Fixes gcc-4.3 builds so drop ftbfs_gcc-4.3_fix.diff.
  + Add new build-dependency for libgnet-dev.
* Add simple man page for new lordsawar-tile-editor.
* Add desktop file for lordsawar-tile-editor.
* Remove French translation on install.

[ Gonéri Le Bouder ]
* bump Debian Policy to 3.8.0. No change needed.
* fix wording in the 0.0.8-3 entry of the Debian changelog

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//  Copyright (C) 2007, 2008 Ben Asselstine
 
2
//
1
3
//  This program is free software; you can redistribute it and/or modify
2
4
//  it under the terms of the GNU General Public License as published by
3
5
//  the Free Software Foundation; either version 2 of the License, or
10
12
//
11
13
//  You should have received a copy of the GNU General Public License
12
14
//  along with this program; if not, write to the Free Software
13
 
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
15
//  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
 
16
//  02110-1301, USA.
14
17
 
15
18
#ifndef SIGNPOSTLIST_H
16
19
#define SIGNPOSTLIST_H
17
20
 
18
21
#include <sigc++/trackable.h>
19
 
#include "ObjectList.h"
 
22
#include "LocationList.h"
20
23
#include "signpost.h"
21
24
 
22
 
/** The signpostlist just keeps track of the signs located on the game map. It
23
 
  * is also implemented as a singleton since many classes use it for looking up
24
 
  * signposts.
25
 
  */
26
 
 
27
 
class Signpostlist : public ObjectList<Signpost>, public sigc::trackable
 
25
//! A list of Signpost objects on the game map.
 
26
/** 
 
27
 * The signpostlist keeps track of the signs located on the game map. It
 
28
 * is implemented as a singleton because many classes use it for looking up
 
29
 * signposts.
 
30
 */
 
31
class Signpostlist : public LocationList<Signpost>, public sigc::trackable
28
32
{
29
33
    public:
30
 
        //! Return the singleton instance. Create a new one if needed.
 
34
        //! Return the singleton instance.  Create a new one if needed.
31
35
        static Signpostlist* getInstance();
32
36
 
33
 
        //! Load the singleton instance with the given savegame
 
37
        //! Load the singleton instance loaded from the opened saved-game file.
34
38
        static Signpostlist* getInstance(XML_Helper* helper);
35
39
 
36
 
        //! Explicitly delete the singleton instance
 
40
        //! Explicitly delete the singleton instance.
37
41
        static void deleteInstance();
38
 
        
39
42
 
40
 
        //! Saves the game data. See XML_Helper for details.
 
43
        //! Saves the signpost list to the opened saved-game file.
41
44
        bool save(XML_Helper* helper) const;
42
45
 
43
46
    protected:
44
 
        //! Default constructor
 
47
        //! Default constructor.
45
48
        Signpostlist();
46
49
 
47
 
        //! Loading constructor
 
50
        //! Loading constructor.
 
51
        /**
 
52
         * @param helper  The opened saved-game file to load the signposts from.
 
53
         */
48
54
        Signpostlist(XML_Helper* helper);
49
55
 
50
56
    private:
51
 
        //! Callback for loading
 
57
        //! Callback for loading signpost objects into the list.
52
58
        bool load(std::string tag, XML_Helper* helper);
53
59
 
 
60
        //! A static pointer for the singleton instance.
54
61
        static Signpostlist* s_instance;
55
62
};
56
63