summaryrefslogtreecommitdiff
path: root/src/core/dom/Node.hpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-11-14 01:24:18 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-11-14 01:24:18 +0100
commit9bc7a08b120d8ad7e158a29ead8a09baa538c56c (patch)
treebbae342e0e78bf1d75640d2cb3ba18a263184939 /src/core/dom/Node.hpp
parent5a6719ec10a311e367891d38a671e4fbbedf8991 (diff)
added TestNode unit test
Diffstat (limited to 'src/core/dom/Node.hpp')
-rw-r--r--src/core/dom/Node.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/dom/Node.hpp b/src/core/dom/Node.hpp
index 571eedd..9c006a1 100644
--- a/src/core/dom/Node.hpp
+++ b/src/core/dom/Node.hpp
@@ -123,7 +123,10 @@ public:
*
* @param mgr is a reference to the Manager instace the node belongs to.
*/
- Node(Manager &mgr) : Managed(mgr) {}
+ Node(Manager &mgr, Handle<Node> parent = nullptr)
+ : Managed(mgr), parent(acquire(parent))
+ {
+ }
/**
* Constructs a new node with the given name and the given parent element.
@@ -132,7 +135,7 @@ public:
* @param name is the name of the Node.
* @param parent is a handle pointing at the parent node.
*/
- Node(Manager &mgr, std::string name, Handle<Node> parent = Null)
+ Node(Manager &mgr, std::string name, Handle<Node> parent = nullptr)
: Managed(mgr), name(name), parent(acquire(parent))
{
}