mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-30 05:47:57 +03:00
Imported Upstream version 0.26.0
This commit is contained in:
commit
9a2b6c69b6
1398 changed files with 212217 additions and 0 deletions
63
components/interpreter/interpreter.hpp
Normal file
63
components/interpreter/interpreter.hpp
Normal file
|
@ -0,0 +1,63 @@
|
|||
#ifndef INTERPRETER_INTERPRETER_H_INCLUDED
|
||||
#define INTERPRETER_INTERPRETER_H_INCLUDED
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "runtime.hpp"
|
||||
#include "types.hpp"
|
||||
|
||||
namespace Interpreter
|
||||
{
|
||||
class Opcode0;
|
||||
class Opcode1;
|
||||
class Opcode2;
|
||||
|
||||
class Interpreter
|
||||
{
|
||||
Runtime mRuntime;
|
||||
std::map<int, Opcode1 *> mSegment0;
|
||||
std::map<int, Opcode2 *> mSegment1;
|
||||
std::map<int, Opcode1 *> mSegment2;
|
||||
std::map<int, Opcode1 *> mSegment3;
|
||||
std::map<int, Opcode2 *> mSegment4;
|
||||
std::map<int, Opcode0 *> mSegment5;
|
||||
|
||||
// not implemented
|
||||
Interpreter (const Interpreter&);
|
||||
Interpreter& operator= (const Interpreter&);
|
||||
|
||||
void execute (Type_Code code);
|
||||
|
||||
void abortUnknownCode (int segment, int opcode);
|
||||
|
||||
void abortUnknownSegment (Type_Code code);
|
||||
|
||||
public:
|
||||
|
||||
Interpreter();
|
||||
|
||||
~Interpreter();
|
||||
|
||||
void installSegment0 (int code, Opcode1 *opcode);
|
||||
///< ownership of \a opcode is transferred to *this.
|
||||
|
||||
void installSegment1 (int code, Opcode2 *opcode);
|
||||
///< ownership of \a opcode is transferred to *this.
|
||||
|
||||
void installSegment2 (int code, Opcode1 *opcode);
|
||||
///< ownership of \a opcode is transferred to *this.
|
||||
|
||||
void installSegment3 (int code, Opcode1 *opcode);
|
||||
///< ownership of \a opcode is transferred to *this.
|
||||
|
||||
void installSegment4 (int code, Opcode2 *opcode);
|
||||
///< ownership of \a opcode is transferred to *this.
|
||||
|
||||
void installSegment5 (int code, Opcode0 *opcode);
|
||||
///< ownership of \a opcode is transferred to *this.
|
||||
|
||||
void run (const Type_Code *code, int codeSize, Context& context);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue