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.2 2003/05/27 17:41:57 simkin_cvs 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 #include <iostream.h>
00031 #endif
00032 
00033 class skMethodTable;
00034 
00035 // this is the value returned by executableType
00036 
00037 #define ELEMENT_TYPE 4
00038 
00039 
00056 class CLASSEXPORT skElementObject : public skExecutable {
00057  public:
00061   IMPORT_C skElementObject();
00068   IMPORT_C skElementObject(const skString& location,skElement * elem,bool created);
00072   IMPORT_C virtual ~skElementObject();
00077   IMPORT_C int executableType() const;                  
00081   IMPORT_C int intValue() const;
00082 #ifdef USE_FLOATING_POINT
00083 
00086   IMPORT_C float floatValue() const;
00087 #endif
00088 
00091   IMPORT_C bool boolValue() const;
00095   IMPORT_C Char charValue() const;
00099   IMPORT_C skString strValue() const;
00108   IMPORT_C virtual bool setValue(const skString& name,const skString& attribute,const skRValue& return_value);
00117   IMPORT_C virtual bool setValueAt(const skRValue& array_index,const skString& attribute,const skRValue& value); 
00128   IMPORT_C virtual bool getValue(const skString& name,const skString& attribute,skRValue& value);
00138   IMPORT_C virtual bool getValueAt(const skRValue& array_index,const skString& attribute,skRValue& value);
00154   IMPORT_C virtual bool method(const skString& name,skRValueArray& args,skRValue& ret,skExecutableContext& ctxt);
00159   IMPORT_C bool equals(const skiExecutable * o) const;
00165   IMPORT_C void copyItemsInto(skElement * other);
00169   IMPORT_C virtual void setAddIfNotPresent(bool enable);
00173   IMPORT_C virtual bool getAddIfNotPresent();
00178   IMPORT_C skElement * getElement();
00183   IMPORT_C const skElement * getElement() const;
00190   IMPORT_C static skString getData(skElement * element);
00197   IMPORT_C static void setData(skElement * element,const skString& data);
00204   IMPORT_C static skElement * findChild(skElement * parent,const skString& tagname);
00205 #ifdef __SYMBIAN32__
00206 
00213   IMPORT_C static skElement * findChild(skElement * parent,const TDesC& tagname);
00214 #endif
00215 
00221   IMPORT_C static skElement * findChild(skElement * parent,int index);
00230   IMPORT_C static skElement * findChild(skElement * parent,const skString& tagname,const skString& attribute,const skString& value);
00231 #ifdef __SYMBIAN32__
00232 
00241   IMPORT_C static skElement * findChild(skElement * parent,const TDesC& tagname,const TDesC& attribute,const skString& value);
00242 #endif
00243 
00246   IMPORT_C void setAttribute(skString name,const skString& value);
00252   IMPORT_C skString getAttribute(const skString& name) const;
00253 #ifdef __SYMBIAN32__
00254 
00259   IMPORT_C skString getAttribute(const TDesC& name) const;
00260 #endif
00261 
00264   IMPORT_C skString getLocation() const;
00268   IMPORT_C void setLocation(const skString& location) ;
00270   IMPORT_C static int countChildren(skElement * parent);
00276   IMPORT_C skExecutableIterator * createIterator(const skString& qualifier);
00281   IMPORT_C skExecutableIterator * createIterator();
00286   IMPORT_C virtual skString getSource(const skString& location);
00292   IMPORT_C virtual void getInstanceVariables(skRValueTable& table);
00298   IMPORT_C virtual void getAttributes(skRValueTable& table);
00305   IMPORT_C virtual void setElement(const skString& location,skElement * element,bool created=false);
00306 #ifdef __SYMBIAN32__
00307 
00314   IMPORT_C void setElement(const TDesC& location,skElement * element,bool created=false);
00315 #endif
00316 
00323   IMPORT_C virtual skElementObject * createElementObject(const skString& location,skElement * element,bool created);
00324  private:
00328   skString m_ScriptLocation;
00332   skElement * m_Element;
00336   skMethodTable * m_MethodCache;
00340   skElementObject(const skElementObject&);
00344   skElementObject& operator=(const skElementObject&);
00349   bool m_AddIfNotPresent;
00351   bool m_Created;
00352 };
00353 
00354 #endif

Generated on Tue May 27 18:40:51 2003 for Simkin C++ for Symbian by doxygen1.3