Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

skExecutableContext.h

00001 /*
00002   Copyright 1996-2003
00003   Simon Whiteside
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Lesser General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Lesser General Public License for more details.
00014 
00015     You should have received a copy of the GNU Lesser General Public
00016     License along with this library; if not, write to the Free Software
00017     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019   $Id: skExecutableContext_8h-source.html,v 1.15 2004/12/17 21:31:14 sdw Exp $
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

Generated on Fri Dec 17 20:27:34 2004 for Simkin by doxygen1.3