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

skElementObject.h

00001 /*
00002   Copyright 1996-2001
00003   Simon Whiteside
00004 
00005 * $Id: skElementObject.h,v 1.2 2001/11/05 19:22:33 sdw Exp $
00006 */
00007 
00008 
00009 #ifndef skELEMENTOBJECT_H
00010 #define skELEMENTOBJECT_H
00011 
00012 #include "skExecutable.h"
00013 #include "skElement.h"
00014 #include <iostream.h>
00015 
00016 class skMethodTable;
00017 
00018 // this is the value returned by executableType
00019 
00020 #define ELEMENT_TYPE 4
00021 
00022 
00039 class CLASSEXPORT skElementObject : public skExecutable {
00040  public:
00044   skElementObject();
00050   skElementObject(const skString& location,skElement * elem,bool created);
00054   ~skElementObject();
00059   int executableType() const;                   
00063   int intValue() const;
00067   float floatValue() const;
00071   bool boolValue() const;
00075   Char charValue() const;
00079   skString strValue() const;
00087   bool setValue(const skString& s,const skString& attribute,const skRValue& return_value);
00095   bool setValueAt(const skRValue& array_index,const skString& attribute,const skRValue& value); 
00105   bool getValue(const skString& s,const skString& attribute,skRValue& return_value);
00110   bool getValueAt(const skRValue& array_index,const skString& attribute,skRValue& value);
00122   bool method(const skString& name,skRValueArray& args,skRValue& ret);
00127   //  bool equals(skExecutable * o) const;
00132   void copyItemsInto(skElement * other);
00136   virtual void setAddIfNotPresent(bool enable);
00140   virtual bool getAddIfNotPresent();
00145   skElement * getElement();
00151   static skString getData(skElement * element);
00157   static void setData(skElement * element,const skString& data);
00164   static skElement * findChild(skElement * parent,const skString& tagname);
00171   static skElement * findChild(skElement * parent,int index);
00180   static skElement * findChild(skElement * parent,const skString& tagname,const skString& attribute,const skString& value);
00184   void setAttribute(skString name,const skString& value);
00189   skString getAttribute(const skString& name);
00193   skString getLocation() const;
00195   static int countChildren(skElement * parent);
00196  protected:
00201   virtual void setElement(skElement * element);
00207   virtual skElementObject * createElementObject(const skString& location,skElement * element,bool created);
00211   skString m_ScriptLocation;
00216   skExecutableIterator * createIterator(const skString& qualifier);
00220   skExecutableIterator * createIterator();
00221  private:
00225   skElement * m_Element;
00229   skMethodTable * m_MethodCache;
00233   skElementObject(const skElementObject&);
00237   skElementObject& operator=(const skElementObject&);
00242   bool m_AddIfNotPresent;
00246   bool m_Created;
00247 
00248 
00249 };
00250 
00251 #endif

Generated on Tue Nov 20 17:56:21 2001 for Simkin by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001