top | up | prev | next

ParentNode Abstract Class

Definition at line 116 of Node.hpp

Constructors

ParentNode(NodeType nodeType_, const std::u32string& name_)
ParentNode(ParentNode&&) delete
ParentNode(const Node&) delete

Member Functions

void Accept(Visitor& visitor) override
Node* AppendChild(std::unique_ptr<Node>&& newChild) virtual
NodeList ChildNodes() const
void CloneChildrenTo(ParentNode* clone) const
Node* FirstChild() const
bool HasChildNodes() const override
Node* InsertBefore(std::unique_ptr<Node>&& newChild, Node* refChild) virtual
Node* LastChild() const
std::unique_ptr<Node> RemoveChild(Node* oldChild) virtual
std::unique_ptr<Node> ReplaceChild(std::unique_ptr<Node>&& newChild, Node* oldChild) virtual
void WalkChildren(NodeOp& nodeOp) override
void WalkDescendant(NodeOp& nodeOp) override
void WalkDescendantOrSelf(NodeOp& nodeOp) override
void WalkPreceding(NodeOp& nodeOp) override
void WalkPrecedingOrSelf(NodeOp& nodeOp) override
void Write(CodeFormatter& formatter)
ParentNode& operator=(ParentNode&&) delete
ParentNode& operator=(const Node&) delete

Member Variables

Node* firstChild
Node* lastChild

Constructor Details

ParentNode Constructor

sngxml::dom::ParentNode::ParentNode(NodeType nodeType_, const std::u32string& name_)

Definition at line 245 of Node.cpp :
245 : Node(nodeType_name_)firstChild(nullptr)lastChild(nullptr)
246 {
247 }


Declaration at line 119 of Node.hpp


ParentNode Constructor

sngxml::dom::ParentNode::ParentNode(ParentNode &&) delete

Definition at line 123 of Node.hpp


ParentNode Constructor

sngxml::dom::ParentNode::ParentNode(const Node &) delete

Definition at line 121 of Node.hpp


Member Function Details

Accept Member Function

void sngxml::dom::ParentNode::Accept(Visitor & visitor) override

Definition at line 427 of Node.cpp :
428 {
429     Node* child = firstChild;
430     while (child != nullptr)
431     {
432         child->Accept(visitor);
433         child = child->NextSibling();
434     }
435 }


Declaration at line 135 of Node.hpp

Base class overridden functions: sngxml::dom::Node::Accept

Derived class overrides: sngxml::dom::Document::Accept , sngxml::dom::Element::Accept

Calls: sngxml::dom::Node::Accept , sngxml::dom::Node::NextSibling

Called by: sngxml::dom::Document::Accept , sngxml::dom::Element::Accept


AppendChild Member Function

Node * sngxml::dom::ParentNode::AppendChild(std::unique_ptr<Node >&& newChild) virtual

Definition at line 387 of Node.cpp
Declaration at line 134 of Node.hpp

Derived class overrides: sngxml::dom::Document::AppendChild

Calls: sngxml::dom::Document::InternalInvalidateIndex , sngxml::dom::Node::GetNodeType , sngxml::dom::Node::InternalLinkAfter , sngxml::dom::Node::InternalSetOwnerDocument , sngxml::dom::Node::InternalSetParent , sngxml::dom::Node::OwnerDocument , sngxml::dom::Node::Parent , sngxml::dom::ParentNode::AppendChild , sngxml::dom::ParentNode::FirstChild , sngxml::dom::ParentNode::RemoveChild

Called by: sngxml::dom::Document::AppendChild , sngxml::dom::ParentNode::AppendChild , sngxml::dom::ParentNode::CloneChildrenTo , sngxml::dom::ParentNode::InsertBefore


ChildNodes Member Function

NodeList sngxml::dom::ParentNode::ChildNodes() const

Definition at line 260 of Node.cpp :
261 {
262     NodeList result;
263     Node* child = firstChild;
264     while (child != nullptr)
265     {
266         result.InternalAddNode(child);
267         child = child->NextSibling();
268     }
269     return result;
270 }


Declaration at line 126 of Node.hpp

Calls: sngxml::dom::Node::NextSibling , sngxml::dom::NodeList::InternalAddNode


CloneChildrenTo Member Function

void sngxml::dom::ParentNode::CloneChildrenTo(ParentNode * clone) const

Definition at line 282 of Node.cpp :
283 {
284     Node* child = firstChild;
285     while (child != nullptr)
286     {
287         clone->AppendChild(child->CloneNode(true));
288         child = child->NextSibling();
289     }
290 }


Declaration at line 128 of Node.hpp

Calls: sngxml::dom::Node::CloneNode , sngxml::dom::Node::NextSibling , sngxml::dom::ParentNode::AppendChild

Called by: sngxml::dom::Document::CloneNode , sngxml::dom::DocumentFragment::CloneNode , sngxml::dom::Element::CloneNode


FirstChild Member Function

Node * sngxml::dom::ParentNode::FirstChild() const

Definition at line 129 of Node.hpp :
129 { return firstChild; }

Called by: sngxml::dom::Element::HasMultilineContent , sngxml::dom::ParentNode::AppendChild , sngxml::dom::ParentNode::InsertBefore


HasChildNodes Member Function

bool sngxml::dom::ParentNode::HasChildNodes() const override

Definition at line 125 of Node.hpp :
125 { return firstChild != nullptr; }

Base class overridden functions: sngxml::dom::Node::HasChildNodes

Called by: sngxml::dom::Element::Write


InsertBefore Member Function

Node * sngxml::dom::ParentNode::InsertBefore(std::unique_ptr<Node >&& newChild, Node * refChild) virtual

Definition at line 292 of Node.cpp
Declaration at line 131 of Node.hpp

Derived class overrides: sngxml::dom::Document::InsertBefore

Calls: sngxml::dom::Document::InternalInvalidateIndex , sngxml::dom::Node::GetNodeType , sngxml::dom::Node::InternalLinkBefore , sngxml::dom::Node::InternalSetOwnerDocument , sngxml::dom::Node::InternalSetParent , sngxml::dom::Node::OwnerDocument , sngxml::dom::Node::Parent , sngxml::dom::ParentNode::AppendChild , sngxml::dom::ParentNode::FirstChild , sngxml::dom::ParentNode::InsertBefore , sngxml::dom::ParentNode::RemoveChild

Called by: sngxml::dom::Document::InsertBefore , sngxml::dom::ParentNode::InsertBefore , sngxml::dom::ParentNode::ReplaceChild


LastChild Member Function

Node * sngxml::dom::ParentNode::LastChild() const

Definition at line 130 of Node.hpp :
130 { return lastChild; }

Called by: sngxml::dom::Element::HasMultilineContent


RemoveChild Member Function

std::unique_ptr<Node > sngxml::dom::ParentNode::RemoveChild(Node * oldChild) virtual

Definition at line 336 of Node.cpp
Declaration at line 133 of Node.hpp

Derived class overrides: sngxml::dom::Document::RemoveChild

Calls: sngxml::dom::Document::InternalInvalidateIndex , sngxml::dom::Node::InternalSetOwnerDocument , sngxml::dom::Node::InternalSetParent , sngxml::dom::Node::InternalUnlink , sngxml::dom::Node::NextSibling , sngxml::dom::Node::OwnerDocument , sngxml::dom::Node::Parent , sngxml::dom::Node::PreviousSibling

Called by: sngxml::dom::Document::RemoveChild , sngxml::dom::ParentNode::AppendChild , sngxml::dom::ParentNode::InsertBefore , sngxml::dom::ParentNode::ReplaceChild


ReplaceChild Member Function

std::unique_ptr<Node > sngxml::dom::ParentNode::ReplaceChild(std::unique_ptr<Node >&& newChild, Node * oldChild) virtual

Definition at line 365 of Node.cpp
Declaration at line 132 of Node.hpp

Derived class overrides: sngxml::dom::Document::ReplaceChild

Calls: sngxml::dom::Document::InternalInvalidateIndex , sngxml::dom::Node::OwnerDocument , sngxml::dom::Node::Parent , sngxml::dom::ParentNode::InsertBefore , sngxml::dom::ParentNode::RemoveChild

Called by: sngxml::dom::Document::ReplaceChild


WalkChildren Member Function

void sngxml::dom::ParentNode::WalkChildren(NodeOp & nodeOp) override

Definition at line 437 of Node.cpp :
438 {
439     Node* child = firstChild;
440     while (child != nullptr)
441     {
442         nodeOp.Apply(child);
443         child = child->NextSibling();
444     }
445 }


Declaration at line 136 of Node.hpp

Base class overridden functions: sngxml::dom::Node::WalkChildren

Calls: sngxml::dom::Node::NextSibling , sngxml::dom::NodeOp::Apply


WalkDescendant Member Function

void sngxml::dom::ParentNode::WalkDescendant(NodeOp & nodeOp) override

Definition at line 447 of Node.cpp :
448 {
449     Node* child = firstChild;
450     while (child != nullptr)
451     {
452         child->WalkDescendantOrSelf(nodeOp);
453         child = child->NextSibling();
454     }
455 }


Declaration at line 137 of Node.hpp

Base class overridden functions: sngxml::dom::Node::WalkDescendant

Calls: sngxml::dom::Node::NextSibling , sngxml::dom::Node::WalkDescendantOrSelf


WalkDescendantOrSelf Member Function

void sngxml::dom::ParentNode::WalkDescendantOrSelf(NodeOp & nodeOp) override

Definition at line 457 of Node.cpp :
458 {
459     Node::WalkDescendantOrSelf(nodeOp);
460     Node* child = firstChild;
461     while (child != nullptr)
462     {
463         child->WalkDescendantOrSelf(nodeOp);
464         child = child->NextSibling();
465     }
466 }


Declaration at line 138 of Node.hpp

Base class overridden functions: sngxml::dom::Node::WalkDescendantOrSelf

Calls: sngxml::dom::Node::NextSibling , sngxml::dom::Node::WalkDescendantOrSelf


WalkPreceding Member Function

void sngxml::dom::ParentNode::WalkPreceding(NodeOp & nodeOp) override

Definition at line 479 of Node.cpp :
480 {
481     Node* preceding = PreviousSibling();
482     if (preceding)
483     {
484         preceding->WalkPrecedingOrSelf(nodeOp);
485     }
486 }


Declaration at line 139 of Node.hpp

Base class overridden functions: sngxml::dom::Node::WalkPreceding

Calls: sngxml::dom::Node::PreviousSibling , sngxml::dom::Node::WalkPrecedingOrSelf


WalkPrecedingOrSelf Member Function

void sngxml::dom::ParentNode::WalkPrecedingOrSelf(NodeOp & nodeOp) override

Definition at line 468 of Node.cpp :
469 {
470     Node::WalkPrecedingOrSelf(nodeOp);
471     Node* child = lastChild;
472     while (child != nullptr)
473     {
474         child->WalkPrecedingOrSelf(nodeOp);
475         child = child->PreviousSibling();
476     }
477 }


Declaration at line 140 of Node.hpp

Base class overridden functions: sngxml::dom::Node::WalkPrecedingOrSelf

Calls: sngxml::dom::Node::PreviousSibling , sngxml::dom::Node::WalkPrecedingOrSelf


Write Member Function

void sngxml::dom::ParentNode::Write(CodeFormatter& formatter)

Definition at line 272 of Node.cpp :
273 {
274     Node* child = firstChild;
275     while (child != nullptr)
276     {
277         child->Write(formatter);
278         child = child->NextSibling();
279     }
280 }


Calls: sngxml::dom::Node::NextSibling , sngxml::dom::Node::Write

Called by: sngxml::dom::Document::Write , sngxml::dom::Element::Write


operator= Member Function

ParentNode & sngxml::dom::ParentNode::operator=(ParentNode &&) delete

Definition at line 124 of Node.hpp


operator= Member Function

ParentNode & sngxml::dom::ParentNode::operator=(const Node &) delete

Definition at line 122 of Node.hpp


top | up | prev | next