OpenMW
apps/openmw/mwbase/scriptmanager.hpp
Go to the documentation of this file.
00001 #ifndef GAME_MWBASE_SCRIPTMANAGER_H
00002 #define GAME_MWBASE_SCRIPTMANAGER_H
00003 
00004 #include <string>
00005 
00006 namespace Interpreter
00007 {
00008     class Context;
00009 }
00010 
00011 namespace Compiler
00012 {
00013     class Locals;
00014 }
00015 
00016 namespace MWScript
00017 {
00018     class GlobalScripts;
00019 }
00020 
00021 namespace MWBase
00022 {
00024     class ScriptManager
00025     {
00026             ScriptManager (const ScriptManager&);
00028 
00029             ScriptManager& operator= (const ScriptManager&);
00031 
00032         public:
00033 
00034             ScriptManager() {}
00035 
00036             virtual ~ScriptManager() {}
00037 
00038             virtual void resetGlobalScripts() = 0;
00039 
00040             virtual void run (const std::string& name, Interpreter::Context& interpreterContext) = 0;
00042 
00043             virtual bool compile (const std::string& name) = 0;
00046 
00047             virtual std::pair<int, int> compileAll() = 0;
00050 
00051             virtual Compiler::Locals& getLocals (const std::string& name) = 0;
00053 
00054             virtual MWScript::GlobalScripts& getGlobalScripts() = 0;
00055 
00056             virtual int getLocalIndex (const std::string& scriptId, const std::string& variable,
00057                 char type) = 0;
00060 
00061     };
00062 }
00063 
00064 #endif