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: skStackFrame_8h-source.html,v 1.2 2003/01/23 15:31:03 simkin_cvs Exp $ 00020 */ 00021 #ifndef skSTACKFRAME_H 00022 #define skSTACKFRAME_H 00023 00024 #include "skString.h" 00025 00026 class CLASSEXPORT skiExecutable; 00027 class CLASSEXPORT skRValueTable; 00028 class CLASSEXPORT skExecutableContext; 00035 class CLASSEXPORT skStackFrame 00036 { 00037 public: 00044 skStackFrame(const skString& location, 00045 skiExecutable * obj, 00046 skRValueTable& vars, 00047 skExecutableContext& context); 00048 ~skStackFrame(); 00052 skString getLocation() const; 00056 int getLineNum() const; 00060 void setLineNum(int line_num); 00064 skExecutableContext& getContext() const; 00068 skiExecutable * getObject() const; 00072 skRValueTable& getVars() const; 00076 skStackFrame * getParentFrame() const; 00080 void setParentFrame(skStackFrame * frame); 00081 private: 00083 skString m_Location; 00085 int m_LineNum; 00087 skExecutableContext& m_Context; 00089 skiExecutable * m_Object; 00091 skRValueTable& m_Vars; 00093 skStackFrame * m_ParentFrame; 00094 }; 00095 00096 //------------------------------------------ 00097 inline skString skStackFrame::getLocation() const 00098 //------------------------------------------ 00099 { 00100 return m_Location; 00101 } 00102 //------------------------------------------ 00103 inline int skStackFrame::getLineNum() const 00104 //------------------------------------------ 00105 { 00106 return m_LineNum; 00107 } 00108 //------------------------------------------ 00109 inline void skStackFrame::setLineNum(int line_num) 00110 //------------------------------------------ 00111 { 00112 m_LineNum=line_num; 00113 } 00114 //------------------------------------------ 00115 inline skExecutableContext& skStackFrame::getContext() const 00116 //------------------------------------------ 00117 { 00118 return m_Context; 00119 } 00120 //------------------------------------------ 00121 inline skiExecutable * skStackFrame::getObject() const 00122 //------------------------------------------ 00123 { 00124 return m_Object; 00125 } 00126 //------------------------------------------ 00127 inline skRValueTable& skStackFrame::getVars() const 00128 //------------------------------------------ 00129 { 00130 return m_Vars; 00131 } 00132 //------------------------------------------ 00133 inline skStackFrame * skStackFrame::getParentFrame() const 00134 //------------------------------------------ 00135 { 00136 return m_ParentFrame; 00137 } 00138 //------------------------------------------ 00139 inline void skStackFrame::setParentFrame(skStackFrame * frame) 00140 //------------------------------------------ 00141 { 00142 m_ParentFrame=frame; 00143 } 00144 #endif 00145