openmw-tes3coop/apps/openmw/mwscript/scriptmanager.hpp

56 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;
}
namespace MWScript
{
struct Locals;
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 15:21:27 +00:00
void run (const std::string& name/*,
Interpreter::Context& interpreterContext*/, Locals& locals);
};
};
#endif