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

skiExecutable.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: skiExecutable_8h-source.html,v 1.17 2004/12/17 21:31:14 sdw Exp $
00020 */
00021 
00022 #ifndef skiEXECUTABLE_H
00023 #define skiEXECUTABLE_H
00024 
00025 #include "skString.h"
00026 #include "skExecutableContext.h"
00027 
00028 class CLASSEXPORT skRValueArray;
00029 class CLASSEXPORT skRValueTable;
00030 class CLASSEXPORT skRValue;
00031 class CLASSEXPORT skExecutableIterator;
00032 class CLASSEXPORT skInterpreter;
00033 
00034 #ifndef EXCEPTIONS_DEFINED
00035 #include "skScriptError.h"
00036 #endif
00037 
00038 /*
00039  * this constant is for undefined type primitive objects
00040  */
00041 const int UNDEFINED_TYPE=0;
00042 /*
00043  * this constant is should be used for the type of any user-defined primitive objects
00044  */
00045 const int START_USER_TYPES=10;
00046 
00051 class CLASSEXPORT skiExecutable
00052 { 
00053  public:
00057    virtual ~skiExecutable() {}
00058   
00063   virtual int executableType() const=0;                 
00067   virtual int intValue() const=0;
00071   virtual bool boolValue() const=0;
00075   virtual Char charValue() const=0;
00079   virtual skString strValue() const=0; 
00080 #ifdef USE_FLOATING_POINT
00081 
00084   virtual float floatValue() const=0;
00085 #endif
00086 
00093   virtual bool setValue(const skString& field_name,const skString& attribute,const skRValue& value)=0; 
00101   virtual bool setValueAt(const skRValue& array_index,const skString& attribute,const skRValue& value)=0; 
00109   virtual bool getValue(const skString& field_name,const skString& attribute,skRValue& value)=0;
00117   virtual bool getValueAt(const skRValue& array_index,const skString& attribute,skRValue& value)=0;
00130   virtual bool method(const skString& method_name,skRValueArray& arguments,skRValue& return_value,skExecutableContext& context)=0;
00134   virtual bool equals(const skiExecutable * other_object) const=0;
00140   virtual skExecutableIterator * createIterator(const skString& qualifier)=0;
00145   virtual skExecutableIterator * createIterator()=0;
00146 
00152   virtual skString getSource(const skString& location)=0;
00157   virtual void getInstanceVariables(skRValueTable& table)=0;
00162   virtual void getAttributes(skRValueTable& table)=0;
00163 };
00164 
00165 // Some help-defines for method, getValue and setValue
00166 
00167 #define IS_METHOD(s,m)          (s==m)
00168 #define IS_GETVALUE(s,v)        (s==v)
00169 #define IS_SETVALUE(s,v)        (s==v)
00170 
00171 
00172 #endif

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