~ubuntu-branches/ubuntu/natty/spring/natty

« back to all changes in this revision

Viewing changes to rts/Game/StartScripts/ScriptHandler.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Ritchie
  • Date: 2010-09-23 18:56:03 UTC
  • mfrom: (3.1.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20100923185603-st97s5chplo42y7w
Tags: 0.82.5.1+dfsg1-1ubuntu1
* Latest upstream version for online play
* debian/control: Replace (rather than conflict) spring-engine
  - spring-engine will be a dummy package (LP: #612905)
  - also set maintainer to MOTU

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef SCRIPTHANDLER_H
2
 
#define SCRIPTHANDLER_H
3
 
// ScriptHandler.h: interface for the CScriptHandler class.
4
 
//
5
 
//////////////////////////////////////////////////////////////////////
6
 
 
7
 
#include <string>
8
 
#include <map>
9
 
#include <list>
10
 
#include "Script.h"
11
 
 
12
 
class CScriptHandler
13
 
{
14
 
public:
15
 
        std::list<std::string> ScriptList();
16
 
        static void SelectScript(std::string s);
17
 
 
18
 
        void AddScript(std::string name,CScript* s);
19
 
        void LoadScriptFile(const std::string& file);
20
 
 
21
 
        static CScriptHandler& Instance();
22
 
 
23
 
        CScript* chosenScript;  ///< Pointer to the selected CScript.
24
 
        std::string chosenName; ///< Name of the selected script.
25
 
private:
26
 
        std::map<std::string,CScript*> scripts; ///< Maps script names to CScript pointers.
27
 
        std::list<CScript*> loaded_scripts;     ///< Scripts loaded and owned by CScriptHandler
28
 
        CScriptHandler();
29
 
        CScriptHandler(CScriptHandler const&);
30
 
        CScriptHandler& operator=(CScriptHandler const&);
31
 
        void LoadScripts();
32
 
        ~CScriptHandler();
33
 
};
34
 
 
35
 
#endif /* SCRIPTHANDLER_H */