X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdom%2Fdom.h;h=6741d375dbc5916bc62700348d476f557b828f6b;hb=87d7e9626f1e2079dc2100de39edfa2150341c06;hp=da40edef7e4682aac2be252870da34747a640cb1;hpb=6232b46968ade11dd56fdb9627a2bda45d0dda7d;p=inkscape.git diff --git a/src/dom/dom.h b/src/dom/dom.h index da40edef7..6741d375d 100644 --- a/src/dom/dom.h +++ b/src/dom/dom.h @@ -12,7 +12,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2005 Bob Jamison + * Copyright (C) 2006 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -29,16 +29,19 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include -#define OWN_STRING +//# include this before the #ifdefs below +#include "domconfig.h" -#ifdef OWN_STRING +#ifdef DOM_STRING_OWN #include "domstring.h" #else +#ifdef DOM_STRING_GLIBMM #include -typedef Glib::ustring DOMString +#else +#include +#endif #endif #define XMLNSNAME "http://www.w3.org/2000/xmlns/" @@ -52,11 +55,18 @@ namespace dom -#ifndef OWN_STRING -typedef unsigned short XMLCh; +#ifdef DOM_STRING_OWN +#else +#ifdef DOM_STRING_GLIBMM +typedef Glib::ustring DOMString; +typedef gunichar XMLCh; +#else typedef std::string DOMString; +typedef unsigned short XMLCh; +#endif #endif + /** * */ @@ -249,6 +259,15 @@ public: strings = other.strings; } + /** + * + */ + DOMStringList &operator=(const DOMStringList &other) + { + strings = other.strings; + return *this; + } + /** * */ @@ -287,6 +306,12 @@ public: namespaceURI = other.namespaceURI; name = other.name; } + NamePair &operator=(const NamePair &other) + { + namespaceURI = other.namespaceURI; + name = other.name; + return *this; + } virtual ~NamePair() {} DOMString namespaceURI; @@ -372,6 +397,15 @@ public: namePairs = other.namePairs; } + /** + * + */ + NameList &operator=(const NameList &other) + { + namePairs = other.namePairs; + return *this; + } + /** * */ @@ -429,6 +463,15 @@ public: implementations = other.implementations; } + /** + * + */ + DOMImplementationList &operator=(const DOMImplementationList &other) + { + implementations = other.implementations; + return *this; + } + /** * */ @@ -825,11 +868,28 @@ public: nodes = other.nodes; } + /** + * + */ + NodeList &operator=(const NodeList &other) + { + nodes = other.nodes; + return *this; + } + /** * */ virtual ~NodeList() {} + /** + * + */ + virtual void clear() + { + nodes.clear(); + } + protected: friend class NodeImpl; @@ -869,13 +929,22 @@ public: } NamedNodeMapEntry(const NamedNodeMapEntry &other) { - namespaceURI = other.namespaceURI; - name = other.name; - node = other.node; + assign(other); + } + NamedNodeMapEntry &operator=(const NamedNodeMapEntry &other) + { + assign(other); + return *this; } virtual ~NamedNodeMapEntry() { } + void assign(const NamedNodeMapEntry &other) + { + namespaceURI = other.namespaceURI; + name = other.name; + node = other.node; + } DOMString namespaceURI; DOMString name; Node *node; @@ -1046,6 +1115,15 @@ public: entries = other.entries; } + /** + * + */ + NamedNodeMap &operator=(const NamedNodeMap &other) + { + entries = other.entries; + return *this; + } + /** * @@ -1531,9 +1609,9 @@ public: typedef enum { - SEVERITY_WARNING = 1, - SEVERITY_ERROR = 2, - SEVERITY_FATAL_ERROR = 3 + DOMERROR_SEVERITY_WARNING = 1, + DOMERROR_SEVERITY_ERROR = 2, + DOMERROR_SEVERITY_FATAL_ERROR = 3 } ErrorSeverity;