openmw/components/interpreter/runtime.hpp

39 lines
896 B
C++
Raw Normal View History

2010-06-28 19:20:45 +02:00
#ifndef INTERPRETER_RUNTIME_H_INCLUDED
#define INTERPRETER_RUNTIME_H_INCLUDED
#include "types.hpp"
namespace Interpreter
{
class Context;
/// Runtime data and engine interface
class Runtime
{
Context& mContext;
2010-06-28 20:46:15 +02:00
const Type_Code *mCode;
2010-06-28 19:20:45 +02:00
int mCodeSize;
2010-06-28 20:46:15 +02:00
int mPC;
2010-06-28 19:20:45 +02:00
public:
Runtime (Context& context);
2010-06-28 20:46:15 +02:00
int getPC() const;
///< return program counter.
2010-06-28 19:20:45 +02:00
void configure (const Interpreter::Type_Code *code, int codeSize);
///< \a context and \a code must exist as least until either configure, clear or
/// the destructor is called. \a codeSize is given in 32-bit words.
void clear();
2010-06-28 20:46:15 +02:00
void setPC (int PC);
///< set program counter.
2010-06-28 19:20:45 +02:00
};
}
#endif