00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SKEXECUTABLECONTEXT_H
00022 #define SKEXECUTABLECONTEXT_H
00023
00024 #include "skGeneral.h"
00025 #ifndef EXCEPTIONS_DEFINED
00026 #include "skScriptError.h"
00027 #endif
00028
00029 class CLASSEXPORT skInterpreter;
00030 class CLASSEXPORT skStackFrame;
00031
00035 class CLASSEXPORT skExecutableContext
00036 {
00037 public:
00038 skExecutableContext(skInterpreter * interp)
00039 : m_Interpreter(interp),m_TopFrame(0)
00040 {
00041 }
00042 skInterpreter * getInterpreter();
00043 #ifndef EXCEPTIONS_DEFINED
00044
00045 skScriptError& getError();
00046 #endif
00047
00048 void pushStackFrame(skStackFrame * frame);
00049 void popStackFrame();
00050 skStackFrame * getTopFrame();
00051 void setTopFrame(skStackFrame * frame);
00052 private:
00053 skStackFrame * m_TopFrame;
00055 skInterpreter * m_Interpreter;
00056 #ifndef EXCEPTIONS_DEFINED
00057
00058 skScriptError m_Error;
00059 #endif
00060 };
00061
00062
00063 inline skInterpreter * skExecutableContext::getInterpreter()
00064
00065 {
00066 return m_Interpreter;
00067 }
00068
00069 inline void skExecutableContext::setTopFrame(skStackFrame * frame)
00070
00071 {
00072 m_TopFrame=frame;
00073 }
00074
00075 inline skStackFrame * skExecutableContext::getTopFrame()
00076
00077 {
00078 return m_TopFrame;
00079 }
00080 #ifndef EXCEPTIONS_DEFINED
00081
00082 inline skScriptError& skExecutableContext::getError()
00083
00084 {
00085 return m_Error;
00086 }
00087 #endif
00088
00089 #endif