1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00
OpenMW/apps/openmw/mwscript/scriptmanager.hpp

54 lines
1.1 KiB
C++
Raw Normal View History

#ifndef GAME_SCRIPT_SCRIPTMANAGER_H
#define GAME_SCRIPT_SCRIPTMANAGER_H
#include <map>
#include <vector>
#include <string>
2010-07-02 15:21:27 +00:00
#include <components/compiler/streamerrorhandler.hpp>
#include <components/compiler/fileparser.hpp>
#include <components/interpreter/types.hpp>
namespace ESMS
{
struct ESMStore;
}
namespace Compiler
{
class Context;
}
namespace Interpreter
{
class Context;
2010-07-03 10:12:13 +00:00
class Interpreter;
}
namespace MWScript
2010-07-02 16:08:00 +00:00
{
class ScriptManager
{
2010-07-02 15:21:27 +00:00
Compiler::StreamErrorHandler mErrorHandler;
const ESMS::ESMStore& mStore;
bool mVerbose;
2010-07-02 15:21:27 +00:00
Compiler::Context& mCompilerContext;
Compiler::FileParser mParser;
std::map<std::string, std::vector<Interpreter::Type_Code> > mScripts;
2010-07-02 15:21:27 +00:00
bool compile (const std::string& name);
public:
2010-07-02 15:21:27 +00:00
ScriptManager (const ESMS::ESMStore& store, bool verbose,
Compiler::Context& compilerContext);
2010-07-02 16:08:00 +00:00
void run (const std::string& name, Interpreter::Context& interpreterContext);
};
};
#endif