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.3 2003/01/23 15:31:03 simkin_cvs 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 {
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

Generated on Thu Jan 23 15:25:38 2003 for Simkin by doxygen1.3-rc1