diff --git a/src/dom/dom.h b/src/dom/dom.h
index da40edef7e4682aac2be252870da34747a640cb1..6741d375dbc5916bc62700348d476f557b828f6b 100644 (file)
--- a/src/dom/dom.h
+++ b/src/dom/dom.h
* Authors:
* Bob Jamison
*
* 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
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <string>
#include <vector>
#include <vector>
-#define OWN_STRING
+//# include this before the #ifdefs below
+#include "domconfig.h"
-#ifdef OWN_STRING
+#ifdef DOM_STRING_OWN
#include "domstring.h"
#else
#include "domstring.h"
#else
+#ifdef DOM_STRING_GLIBMM
#include <glibmm.h>
#include <glibmm.h>
-typedef Glib::ustring DOMString
+#else
+#include <string>
+#endif
#endif
#define XMLNSNAME "http://www.w3.org/2000/xmlns/"
#endif
#define XMLNSNAME "http://www.w3.org/2000/xmlns/"
-#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 std::string DOMString;
+typedef unsigned short XMLCh;
+#endif
#endif
#endif
+
/**
*
*/
/**
*
*/
strings = other.strings;
}
strings = other.strings;
}
+ /**
+ *
+ */
+ DOMStringList &operator=(const DOMStringList &other)
+ {
+ strings = other.strings;
+ return *this;
+ }
+
/**
*
*/
/**
*
*/
namespaceURI = other.namespaceURI;
name = other.name;
}
namespaceURI = other.namespaceURI;
name = other.name;
}
+ NamePair &operator=(const NamePair &other)
+ {
+ namespaceURI = other.namespaceURI;
+ name = other.name;
+ return *this;
+ }
virtual ~NamePair() {}
DOMString namespaceURI;
virtual ~NamePair() {}
DOMString namespaceURI;
namePairs = other.namePairs;
}
namePairs = other.namePairs;
}
+ /**
+ *
+ */
+ NameList &operator=(const NameList &other)
+ {
+ namePairs = other.namePairs;
+ return *this;
+ }
+
/**
*
*/
/**
*
*/
implementations = other.implementations;
}
implementations = other.implementations;
}
+ /**
+ *
+ */
+ DOMImplementationList &operator=(const DOMImplementationList &other)
+ {
+ implementations = other.implementations;
+ return *this;
+ }
+
/**
*
*/
/**
*
*/
nodes = other.nodes;
}
nodes = other.nodes;
}
+ /**
+ *
+ */
+ NodeList &operator=(const NodeList &other)
+ {
+ nodes = other.nodes;
+ return *this;
+ }
+
/**
*
*/
virtual ~NodeList() {}
/**
*
*/
virtual ~NodeList() {}
+ /**
+ *
+ */
+ virtual void clear()
+ {
+ nodes.clear();
+ }
+
protected:
friend class NodeImpl;
protected:
friend class NodeImpl;
}
NamedNodeMapEntry(const NamedNodeMapEntry &other)
{
}
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()
{
}
}
virtual ~NamedNodeMapEntry()
{
}
+ void assign(const NamedNodeMapEntry &other)
+ {
+ namespaceURI = other.namespaceURI;
+ name = other.name;
+ node = other.node;
+ }
DOMString namespaceURI;
DOMString name;
Node *node;
DOMString namespaceURI;
DOMString name;
Node *node;
entries = other.entries;
}
entries = other.entries;
}
+ /**
+ *
+ */
+ NamedNodeMap &operator=(const NamedNodeMap &other)
+ {
+ entries = other.entries;
+ return *this;
+ }
+
/**
*
/**
*
typedef enum
{
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;
} ErrorSeverity;