top | up | prev | next

Node Abstract Class

Definition at line 62 of Node.hpp

Constructors

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

Member Functions

void Accept(Visitor& visitor) virtual
std::unique_ptr<Node> CloneNode(bool deep) pure virtual
NodeType GetNodeType() const
bool HasAttributes() const virtual
bool HasChildNodes() const virtual
void InternalLinkAfter(Node* newNode)
void InternalLinkBefore(Node* newNode)
void InternalSetNamespaceUri(const std::u32string& namespaceUri_)
void InternalSetOwnerDocument(Document* ownerDocument_)
void InternalSetParent(ParentNode* parent_)
void InternalUnlink()
std::u32string LocalName() const
const std::u32string& Name() const
const std::u32string& NamespaceUri() const
Node* NextSibling() const
Document* OwnerDocument() const
ParentNode* Parent() const
std::u32string Prefix() const
Node* PreviousSibling() const
void SetPrefix(const std::u32string& prefix)
bool ValueContainsNewLine() const virtual
void Walk(NodeOp& nodeOp, Axis axis)
void WalkAncestor(NodeOp& nodeOp)
void WalkAncestorOrSelf(NodeOp& nodeOp)
void WalkAttribute(NodeOp& nodeOp) virtual
void WalkChildren(NodeOp& nodeOp) virtual
void WalkDescendant(NodeOp& nodeOp) virtual
void WalkDescendantOrSelf(NodeOp& nodeOp) virtual
void WalkFollowing(NodeOp& nodeOp) virtual
void WalkFollowingSibling(NodeOp& nodeOp)
void WalkParent(NodeOp& nodeOp)
void WalkPreceding(NodeOp& nodeOp) virtual
void WalkPrecedingOrSelf(NodeOp& nodeOp) virtual
void WalkPrecedingSibling(NodeOp& nodeOp)
void Write(CodeFormatter& formatter) pure virtual
Node& operator=(Node&&) delete
Node& operator=(const Node&) delete

Member Variables

std::u32string name
std::u32string namespaceUri
Node* nextSibling
NodeType nodeType
Document* ownerDocument
ParentNode* parent
Node* previousSibling

Constructor Details

Node Constructor

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

Definition at line 69 of Node.hpp


Node Constructor

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

Definition at line 43 of Node.cpp :
 43 : nodeType(nodeType_)name(name_)parent(nullptr)previousSibling(nullptr)nextSibling(nullptr)ownerDocument(nullptr)
 44 {
 45 }


Declaration at line 65 of Node.hpp


Node Constructor

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

Definition at line 67 of Node.hpp


Member Function Details

Accept Member Function

void sngxml::dom::Node::Accept(Visitor & visitor) virtual

Definition at line 82 of Node.hpp :
 82 {}

Derived class overrides: sngxml::dom::CDataSection::Accept , sngxml::dom::Comment::Accept , sngxml::dom::Document::Accept , sngxml::dom::Element::Accept , sngxml::dom::EntityReference::Accept , sngxml::dom::ParentNode::Accept , sngxml::dom::ProcessingInstruction::Accept , sngxml::dom::Text::Accept

Called by: sngxml::dom::ParentNode::Accept


CloneNode Member Function

std::unique_ptr<Node > sngxml::dom::Node::CloneNode(bool deep) pure virtual

Definition at line 71 of Node.hpp

Derived class overrides: sngxml::dom::Attr::CloneNode , sngxml::dom::CDataSection::CloneNode , sngxml::dom::Comment::CloneNode , sngxml::dom::Document::CloneNode , sngxml::dom::DocumentFragment::CloneNode , sngxml::dom::Element::CloneNode , sngxml::dom::EntityReference::CloneNode , sngxml::dom::ProcessingInstruction::CloneNode , sngxml::dom::Text::CloneNode

Called by: sngxml::dom::ParentNode::CloneChildrenTo


GetNodeType Member Function

NodeType sngxml::dom::Node::GetNodeType() const

Definition at line 72 of Node.hpp :
 72 { return nodeType; }

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


HasAttributes Member Function

bool sngxml::dom::Node::HasAttributes() const virtual

Definition at line 79 of Node.hpp :
 79 { return false; }

Derived class overrides: sngxml::dom::Element::HasAttributes


HasChildNodes Member Function

bool sngxml::dom::Node::HasChildNodes() const virtual

Definition at line 78 of Node.hpp :
 78 { return false; }

Derived class overrides: sngxml::dom::ParentNode::HasChildNodes


InternalLinkAfter Member Function

void sngxml::dom::Node::InternalLinkAfter(Node * newNode)

Definition at line 221 of Node.cpp :
222 {
223     newNode->previousSibling = this;
224     newNode->nextSibling = nextSibling;
225     nextSibling = newNode;
226 }


Declaration at line 101 of Node.hpp

Called by: sngxml::dom::ParentNode::AppendChild


InternalLinkBefore Member Function

void sngxml::dom::Node::InternalLinkBefore(Node * newNode)

Definition at line 214 of Node.cpp :
215 {
216     newNode->previousSibling = previousSibling;
217     newNode->nextSibling = this;
218     previousSibling = newNode;
219 }


Declaration at line 100 of Node.hpp

Called by: sngxml::dom::ParentNode::InsertBefore


InternalSetNamespaceUri Member Function

void sngxml::dom::Node::InternalSetNamespaceUri(const std::u32string& namespaceUri_)

Definition at line 240 of Node.cpp :
241 {
242     namespaceUri = namespaceUri_;
243 }


Declaration at line 105 of Node.hpp


InternalSetOwnerDocument Member Function

void sngxml::dom::Node::InternalSetOwnerDocument(Document * ownerDocument_)

Definition at line 104 of Node.hpp :
104 { ownerDocument = ownerDocument_; }

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


InternalSetParent Member Function

void sngxml::dom::Node::InternalSetParent(ParentNode * parent_)

Definition at line 103 of Node.hpp :
103 { parent = parent_; }

Called by: sngxml::dom::Element::CloneNode , sngxml::dom::ParentNode::AppendChild , sngxml::dom::ParentNode::InsertBefore , sngxml::dom::ParentNode::RemoveChild


void sngxml::dom::Node::InternalUnlink()

Definition at line 228 of Node.cpp :
229 {
230     if (previousSibling)
231     {
232         previousSibling->nextSibling = nextSibling;
233     }
234     if (nextSibling)
235     {
236         nextSibling->previousSibling = previousSibling;
237     }
238 }


Declaration at line 102 of Node.hpp

Called by: sngxml::dom::ParentNode::RemoveChild


LocalName Member Function

std::u32string sngxml::dom::Node::LocalName() const

Definition at line 94 of Node.cpp
Declaration at line 77 of Node.hpp


Name Member Function

const std::u32string& sngxml::dom::Node::Name() const

Definition at line 73 of Node.hpp :
 73 { return name; }

Called by: sngxml::dom::Attr::CloneNode , sngxml::dom::Attr::Write , sngxml::dom::Element::AddAttribute , sngxml::dom::Element::CloneNode , sngxml::dom::Element::TagName , sngxml::dom::Element::Write , sngxml::dom::ElementsByTagNameVisitor::BeginVisit


NamespaceUri Member Function

const std::u32string& sngxml::dom::Node::NamespaceUri() const

Definition at line 74 of Node.hpp :
 74 { return namespaceUri; }


NextSibling Member Function

Node * sngxml::dom::Node::NextSibling() const

Definition at line 97 of Node.hpp :
 97 { return nextSibling; }

Called by: sngxml::dom::ParentNode::Accept , sngxml::dom::ParentNode::ChildNodes , sngxml::dom::ParentNode::CloneChildrenTo , sngxml::dom::ParentNode::RemoveChild , sngxml::dom::ParentNode::WalkChildren , sngxml::dom::ParentNode::WalkDescendant , sngxml::dom::ParentNode::WalkDescendantOrSelf , sngxml::dom::ParentNode::Write , sngxml::dom::ParentNode::destructor


OwnerDocument Member Function

Document * sngxml::dom::Node::OwnerDocument() const

Definition at line 99 of Node.hpp :
 99 { return ownerDocument; }

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


Parent Member Function

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

Definition at line 98 of Node.hpp :
 98 { return parent; }

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


Prefix Member Function

std::u32string sngxml::dom::Node::Prefix() const

Definition at line 51 of Node.cpp
Declaration at line 75 of Node.hpp


PreviousSibling Member Function

Node * sngxml::dom::Node::PreviousSibling() const

Definition at line 96 of Node.hpp :
 96 { return previousSibling; }

Called by: sngxml::dom::ParentNode::RemoveChild , sngxml::dom::ParentNode::WalkPreceding , sngxml::dom::ParentNode::WalkPrecedingOrSelf


SetPrefix Member Function

void sngxml::dom::Node::SetPrefix(const std::u32string& prefix)

Definition at line 64 of Node.cpp
Declaration at line 76 of Node.hpp


ValueContainsNewLine Member Function

bool sngxml::dom::Node::ValueContainsNewLine() const virtual

Definition at line 81 of Node.hpp :
 81 { return false; }

Derived class overrides: sngxml::dom::CharacterData::ValueContainsNewLine

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


Walk Member Function

void sngxml::dom::Node::Walk(NodeOp & nodeOp, Axis axis)

Definition at line 114 of Node.cpp
Declaration at line 83 of Node.hpp

Calls: sngxml::dom::Node::WalkAncestor , sngxml::dom::Node::WalkAncestorOrSelf , sngxml::dom::Node::WalkAttribute , sngxml::dom::Node::WalkChildren , sngxml::dom::Node::WalkDescendant , sngxml::dom::Node::WalkDescendantOrSelf , sngxml::dom::Node::WalkFollowing , sngxml::dom::Node::WalkFollowingSibling , sngxml::dom::Node::WalkParent , sngxml::dom::Node::WalkPreceding , sngxml::dom::Node::WalkPrecedingSibling , sngxml::dom::NodeOp::Apply


WalkAncestor Member Function

void sngxml::dom::Node::WalkAncestor(NodeOp & nodeOp)

Definition at line 173 of Node.cpp :
174 {
175     if (parent)
176     {
177         parent->WalkAncestorOrSelf(nodeOp);
178     }
179 }


Declaration at line 91 of Node.hpp

Calls: sngxml::dom::Node::WalkAncestorOrSelf

Called by: sngxml::dom::Node::Walk


WalkAncestorOrSelf Member Function

void sngxml::dom::Node::WalkAncestorOrSelf(NodeOp & nodeOp)

Definition at line 181 of Node.cpp :
182 {
183     nodeOp.Apply(this);
184     if (parent)
185     {
186         parent->WalkAncestorOrSelf(nodeOp);
187     }
188 }


Declaration at line 92 of Node.hpp

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

Called by: sngxml::dom::Node::Walk , sngxml::dom::Node::WalkAncestor , sngxml::dom::Node::WalkAncestorOrSelf


WalkAttribute Member Function

void sngxml::dom::Node::WalkAttribute(NodeOp & nodeOp) virtual

Definition at line 210 of Node.cpp :
211 {
212 }


Declaration at line 95 of Node.hpp

Derived class overrides: sngxml::dom::Element::WalkAttribute

Called by: sngxml::dom::Node::Walk


WalkChildren Member Function

void sngxml::dom::Node::WalkChildren(NodeOp & nodeOp) virtual

Definition at line 133 of Node.cpp :
134 {
135 }


Declaration at line 84 of Node.hpp

Derived class overrides: sngxml::dom::ParentNode::WalkChildren

Called by: sngxml::dom::Node::Walk


WalkDescendant Member Function

void sngxml::dom::Node::WalkDescendant(NodeOp & nodeOp) virtual

Definition at line 137 of Node.cpp :
138 {
139 }


Declaration at line 85 of Node.hpp

Derived class overrides: sngxml::dom::ParentNode::WalkDescendant

Called by: sngxml::dom::Node::Walk


WalkDescendantOrSelf Member Function

void sngxml::dom::Node::WalkDescendantOrSelf(NodeOp & nodeOp) virtual

Definition at line 141 of Node.cpp :
142 {
143     nodeOp.Apply(this);
144 }


Declaration at line 86 of Node.hpp

Derived class overrides: sngxml::dom::ParentNode::WalkDescendantOrSelf

Calls: sngxml::dom::NodeOp::Apply

Called by: sngxml::dom::Node::Walk , sngxml::dom::Node::WalkFollowing , sngxml::dom::ParentNode::WalkDescendant , sngxml::dom::ParentNode::WalkDescendantOrSelf


WalkFollowing Member Function

void sngxml::dom::Node::WalkFollowing(NodeOp & nodeOp) virtual

Definition at line 154 of Node.cpp :
155 {
156     Node* ns = nextSibling;
157     if (ns)
158     {
159         ns->WalkDescendantOrSelf(nodeOp);
160         ns = ns->nextSibling;
161     }
162 }


Declaration at line 88 of Node.hpp

Calls: sngxml::dom::Node::WalkDescendantOrSelf

Called by: sngxml::dom::Node::Walk


WalkFollowingSibling Member Function

void sngxml::dom::Node::WalkFollowingSibling(NodeOp & nodeOp)

Definition at line 190 of Node.cpp :
191 {
192     Node* ns = nextSibling;
193     if (ns)
194     {
195         nodeOp.Apply(ns);
196         ns = ns->nextSibling;
197     }
198 }


Declaration at line 93 of Node.hpp

Calls: sngxml::dom::NodeOp::Apply

Called by: sngxml::dom::Node::Walk


WalkParent Member Function

void sngxml::dom::Node::WalkParent(NodeOp & nodeOp)

Definition at line 146 of Node.cpp :
147 {
148     if (parent)
149     {
150         nodeOp.Apply(parent);
151     }
152 }


Declaration at line 87 of Node.hpp

Calls: sngxml::dom::NodeOp::Apply

Called by: sngxml::dom::Node::Walk


WalkPreceding Member Function

void sngxml::dom::Node::WalkPreceding(NodeOp & nodeOp) virtual

Definition at line 164 of Node.cpp :
165 {
166 }


Declaration at line 89 of Node.hpp

Derived class overrides: sngxml::dom::ParentNode::WalkPreceding

Called by: sngxml::dom::Node::Walk


WalkPrecedingOrSelf Member Function

void sngxml::dom::Node::WalkPrecedingOrSelf(NodeOp & nodeOp) virtual

Definition at line 168 of Node.cpp :
169 {
170     nodeOp.Apply(this);
171 }


Declaration at line 90 of Node.hpp

Derived class overrides: sngxml::dom::ParentNode::WalkPrecedingOrSelf

Calls: sngxml::dom::NodeOp::Apply

Called by: sngxml::dom::ParentNode::WalkPreceding , sngxml::dom::ParentNode::WalkPrecedingOrSelf


WalkPrecedingSibling Member Function

void sngxml::dom::Node::WalkPrecedingSibling(NodeOp & nodeOp)

Definition at line 200 of Node.cpp :
201 {
202     Node* ps = previousSibling;
203     if (ps)
204     {
205         nodeOp.Apply(ps);
206         ps = ps->previousSibling;
207     }
208 }


Declaration at line 94 of Node.hpp

Calls: sngxml::dom::NodeOp::Apply

Called by: sngxml::dom::Node::Walk


Write Member Function

void sngxml::dom::Node::Write(CodeFormatter & formatter) pure virtual

Definition at line 80 of Node.hpp

Called by: sngxml::dom::ParentNode::Write


operator= Member Function

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

Definition at line 70 of Node.hpp


operator= Member Function

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

Definition at line 68 of Node.hpp


top | up | prev | next