OpenMW
apps/openmw/mwscript/globalscripts.hpp
Go to the documentation of this file.
00001 #ifndef GAME_SCRIPT_GLOBALSCRIPTS_H
00002 #define GAME_SCRIPT_GLOBALSCRIPTS_H
00003 
00004 #include <string>
00005 #include <map>
00006 
00007 #include "locals.hpp"
00008 
00009 namespace MWWorld 
00010 {
00011     struct ESMStore;
00012 }
00013 
00014 namespace MWScript
00015 {
00016     class GlobalScripts
00017     {
00018             const MWWorld::ESMStore& mStore;
00019             std::map<std::string, std::pair<bool, Locals> > mScripts; // running, local variables
00020 
00021         public:
00022 
00023             GlobalScripts (const MWWorld::ESMStore& store);
00024 
00025             void reset();
00026 
00027             void addScript (const std::string& name);
00028 
00029             void removeScript (const std::string& name);
00030 
00031             bool isRunning (const std::string& name) const;
00032 
00033             void run();
00035     };
00036 }
00037 
00038 #endif