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 #ifdef __SYMBIAN32__
00037 : public CBase
00038 #endif
00039 {
00040 public:
00045   skExecutableContext(skInterpreter * interp)
00046     : m_TopFrame(0),m_Interpreter(interp)
00047     {
00048     }
00049   skInterpreter *  getInterpreter();
00050 #ifndef EXCEPTIONS_DEFINED
00051 
00054   skScriptError&  getError();
00055 #endif
00056   
00060   void pushStackFrame(skStackFrame * frame);
00064   void popStackFrame();
00068   skStackFrame *  getTopFrame();
00072   void            setTopFrame(skStackFrame * frame);
00073 private:
00074   skStackFrame *  m_TopFrame;
00076   skInterpreter *   m_Interpreter;
00077 #ifndef EXCEPTIONS_DEFINED
00078 
00079   skScriptError   m_Error;
00080 #endif
00081 };
00082 
00083 
00084 inline skInterpreter *  skExecutableContext::getInterpreter()
00085 
00086 {
00087   return m_Interpreter;
00088 }
00089 
00090 inline void skExecutableContext::setTopFrame(skStackFrame * frame)
00091 
00092 {
00093   m_TopFrame=frame;
00094 }
00095 
00096 inline skStackFrame *  skExecutableContext::getTopFrame()
00097 
00098 {
00099   return m_TopFrame;
00100 }
00101 #ifndef EXCEPTIONS_DEFINED
00102 
00103 inline skScriptError&  skExecutableContext::getError()
00104 
00105 {
00106   return m_Error;
00107 }
00108 #endif
00109 
00110 #endif