Main Page   Class Hierarchy   Compound List   File List   Compound Members  

skXMLElementObject.h

00001 /*
00002   Copyright 1996-2000
00003   Simon Whiteside
00004 
00005 * $Id: skXMLElementObject.h-source.html,v 1.1 2001/03/05 16:22:46 sdw Exp $
00006 */
00007 
00008 
00009 #ifndef skXMLELEMENTOBJECT_H
00010 #define skXMLELEMENTOBJECT_H
00011 
00012 #include "skExecutable.h"
00013 #include "dom/DOM_Element.hpp"
00014 #include <iostream.h>
00015 
00016 class skMethodTable;
00017 
00018 // this is the value returned by executableType
00019 
00020 #define XMLELEMENT_TYPE 2
00021 
00022 /*
00023  * A stream operator for DOM_Nodes
00024  */
00025 extern ostream& operator<<(ostream& target, DOM_Node& toWrite);
00026 /*
00027  * A stream operator for DOM_Strings
00028  */
00029 extern ostream& operator<< (ostream& target, const DOMString& s);
00030 
00043 class skXMLElementObject : public skExecutable {
00044  public:
00048   skXMLElementObject();
00054   skXMLElementObject(const skString& location,DOM_Element elem);
00058   ~skXMLElementObject();
00063   int executableType() const;                   
00067   int intValue() const;
00071   float floatValue() const;
00075   bool boolValue() const;
00079   char charValue() const;
00083   skString strValue() const;
00091   bool setValue(const skString& s,const skString& attribute,const skRValue& return_value);
00100   bool getValue(const skString& s,const skString& attribute,skRValue& return_value);
00112   bool method(const skString& name,skRValueArray& args,skRValue& ret);
00117   //  bool equals(skExecutable * o) const;
00122   void copyItemsInto(DOM_Element other);
00127   DOM_Element getElement();
00133   static skString getData(DOM_Element element);
00139   static void setData(DOM_Element element,const skString& data);
00146   static DOM_Element findChild(DOM_Element parent,const skString& tagname);
00155   static DOM_Element findChild(DOM_Element parent,const skString& tagname,const skString& attribute,const skString& value);
00159   void setAttribute(skString name,const skString& value);
00164   skString getAttribute(const skString& name);
00168   static skString toString(DOMString str);
00172   static DOMString fromString(const skString& str);
00176   skString getLocation() const;
00177  protected:
00182   void setElement(DOM_Element element);
00183  protected:
00187   skString m_ScriptLocation;
00188  private:
00192   DOM_Element m_Element;
00196   skMethodTable * m_MethodCache;
00200   skXMLElementObject(const skXMLElementObject&);
00204   skXMLElementObject& operator=(const skXMLElementObject&);
00205 };
00206 
00207 #endif

Generated at Mon Mar 5 16:00:30 2001 for Simkin by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000