]> Shamusworld >> Repos - architektonas/blob - src/base/scriptlist.h
Bugfixes related to removing Snapper class.
[architektonas] / src / base / scriptlist.h
1 #ifndef __SCRIPTLIST_H__
2 #define __SCRIPTLIST_H__
3
4 #include <QtCore>
5 #include "script.h"
6
7 #define SCRIPTLIST ScriptList::instance()
8 #warning "!!! THIS CLASS IS OBSOLETE !!!"
9
10 /**
11  * The global list of scripts. This is implemented as a singleton.
12  * Use ScriptList::instance() to get a pointer to the object.
13  *
14  * OBSOLETE
15  *
16  * @author Andrew Mustun
17  */
18 class ScriptList
19 {
20         protected:
21                 ScriptList();
22
23         public:
24                 virtual ~ScriptList();
25
26                 static ScriptList * instance();
27                 void init();
28                 void clearScripts();
29                 int countScripts();
30                 virtual void removeScript(Script * script);
31                 Script * requestScript(const QString & name);
32                 Script * firstScript();
33                 Script * nextScript();
34                 static bool test();
35
36         protected:
37                 static ScriptList * uniqueInstance;
38
39         private:
40                 //! all scripts available
41                 QList<Script *> scripts;
42                 QListIterator<Script *> scriptIterator;
43 };
44
45 #endif  // __SCRIPTLIST_H__