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

skElementObject.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: skElementObject_8h-source.html,v 1.17 2004/12/17 21:31:14 sdw Exp $
00020 */
00021 
00022 
00023 #ifndef skELEMENTOBJECT_H
00024 #define skELEMENTOBJECT_H
00025 
00026 #include "skExecutable.h"
00027 #include "skElement.h"
00028 
00029 #ifdef STREAMS_ENABLED
00030 #ifdef STL_STREAMS
00031 #include <ostream>
00032 using namespace std;
00033 #else
00034 #include <iostream.h>
00035 #endif
00036 #endif
00037 
00038 class skMethodTable;
00039 
00040 // this is the value returned by executableType
00041 
00042 #define ELEMENT_TYPE 4
00043 
00044 
00061 class CLASSEXPORT skElementObject : public skExecutable {
00062  public:
00066   IMPORT_C skElementObject();
00073   IMPORT_C skElementObject(const skString& location,skElement * elem,bool created);
00077   IMPORT_C virtual ~skElementObject();
00082   IMPORT_C int executableType() const;                  
00086   IMPORT_C int intValue() const;
00087 #ifdef USE_FLOATING_POINT
00088 
00091   IMPORT_C float floatValue() const;
00092 #endif
00093 
00096   IMPORT_C bool boolValue() const;
00100   IMPORT_C Char charValue() const;
00104   IMPORT_C skString strValue() const;
00113   IMPORT_C virtual bool setValue(const skString& name,const skString& attribute,const skRValue& return_value);
00122   IMPORT_C virtual bool setValueAt(const skRValue& array_index,const skString& attribute,const skRValue& value); 
00133   IMPORT_C virtual bool getValue(const skString& name,const skString& attribute,skRValue& value);
00143   IMPORT_C virtual bool getValueAt(const skRValue& array_index,const skString& attribute,skRValue& value);
00159   IMPORT_C virtual bool method(const skString& name,skRValueArray& args,skRValue& ret,skExecutableContext& ctxt);
00164   IMPORT_C bool equals(const skiExecutable * o) const;
00170   IMPORT_C void copyItemsInto(skElement * other);
00174   IMPORT_C virtual void setAddIfNotPresent(bool enable);
00178   IMPORT_C virtual bool getAddIfNotPresent();
00183   IMPORT_C skElement * getElement();
00188   IMPORT_C const skElement * getElement() const;
00195   IMPORT_C static skString getData(skElement * element);
00202   IMPORT_C static void setData(skElement * element,const skString& data);
00209   IMPORT_C static skElement * findChild(skElement * parent,const skString& tagname);
00210 #ifdef __SYMBIAN32__
00211 
00218   IMPORT_C static skElement * findChild(skElement * parent,const TDesC& tagname);
00219 #endif
00220 
00226   IMPORT_C static skElement * findChild(skElement * parent,int index);
00235   IMPORT_C static skElement * findChild(skElement * parent,const skString& tagname,const skString& attribute,const skString& value);
00236 #ifdef __SYMBIAN32__
00237 
00246   IMPORT_C static skElement * findChild(skElement * parent,const TDesC& tagname,const TDesC& attribute,const skString& value);
00247 #endif
00248 
00251   IMPORT_C void setAttribute(skString name,const skString& value);
00257   IMPORT_C skString getAttribute(const skString& name) const;
00258 #ifdef __SYMBIAN32__
00259 
00264   IMPORT_C skString getAttribute(const TDesC& name) const;
00265 #endif
00266 
00269   IMPORT_C skString getLocation() const;
00273   IMPORT_C void setLocation(const skString& location) ;
00275   IMPORT_C static int countChildren(skElement * parent);
00281   IMPORT_C skExecutableIterator * createIterator(const skString& qualifier);
00286   IMPORT_C skExecutableIterator * createIterator();
00291   IMPORT_C virtual skString getSource(const skString& location);
00297   IMPORT_C virtual void getInstanceVariables(skRValueTable& table);
00303   IMPORT_C virtual void getAttributes(skRValueTable& table);
00310   IMPORT_C virtual void setElement(const skString& location,skElement * element,bool created=false);
00311 #ifdef __SYMBIAN32__
00312 
00319   IMPORT_C void setElement(const TDesC& location,skElement * element,bool created=false);
00320 #endif
00321 
00328   IMPORT_C virtual skElementObject * createElementObject(const skString& location,skElement * element,bool created);
00329  private:
00333   skString m_ScriptLocation;
00337   skElement * m_Element;
00341   skMethodTable * m_MethodCache;
00345   skElementObject(const skElementObject&);
00349   skElementObject& operator=(const skElementObject&);
00354   bool m_AddIfNotPresent;
00356   bool m_Created;
00357 };
00358 
00359 #endif

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