top | up | prev | next

Element Class

Definition at line 30 of Element.hpp

Constructors

Element(Element&&) delete
Element(const Element&) delete
Element(const std::u32string& name_)
Element(const std::u32string& name_, std::map<std::u32string, std::unique_ptr<Attr>>&& attributeMap_)

Member Functions

void Accept(Visitor& visitor) override
void AddAttribute(std::unique_ptr<Attr>&& attr)
std::unique_ptr<Node> CloneNode(bool deep) override
std::u32string GetAttribute(const std::u32string& attrName) const
NodeList GetElementsByTagName(const std::u32string& tagName)
bool HasAttributes() const override
bool HasMultilineContent()
void RemoveAttribute(const std::u32string& attrName)
void SetAttribute(const std::u32string& attrName, const std::u32string& attrValue)
const std::u32string& TagName() const
void WalkAttribute(NodeOp& nodeOp) override
void Write(CodeFormatter& formatter) override
void WriteAttributes(CodeFormatter& formatter)
Element& operator=(Element&&) delete
Element& operator=(const Element&) delete

Member Variables

std::map<std::u32string, std::unique_ptr<Attr>> attributeMap

Constructor Details

Element Constructor

sngxml::dom::Element::Element(Element &&) delete

Definition at line 37 of Element.hpp


Element Constructor

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

Definition at line 35 of Element.hpp


Element Constructor

sngxml::dom::Element::Element(const std::u32string& name_)

Definition at line 73 of Element.cpp
Declaration at line 33 of Element.hpp


Element Constructor

sngxml::dom::Element::Element(const std::u32string& name_, std::map<std::u32string, std::unique_ptr<Attr >>&& attributeMap_)

Definition at line 77 of Element.cpp
Declaration at line 34 of Element.hpp


Member Function Details

Accept Member Function

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

Definition at line 247 of Element.cpp
Declaration at line 49 of Element.hpp

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

Calls: sngxml::dom::ParentNode::Accept

Called by: sngxml::dom::Element::GetElementsByTagName


AddAttribute Member Function

void sngxml::dom::Element::AddAttribute(std::unique_ptr<Attr >&& attr)

Definition at line 193 of Element.cpp
Declaration at line 44 of Element.hpp

Calls: sngxml::dom::Node::Name


CloneNode Member Function

std::unique_ptr<Node > sngxml::dom::Element::CloneNode(bool deep) override

Definition at line 81 of Element.cpp
Declaration at line 39 of Element.hpp

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

Calls: sngxml::dom::Element::CloneNode , sngxml::dom::Node::InternalSetParent , sngxml::dom::Node::Name , sngxml::dom::ParentNode::CloneChildrenTo

Called by: sngxml::dom::Element::CloneNode


GetAttribute Member Function

std::u32string sngxml::dom::Element::GetAttribute(const std::u32string& attrName) const

Definition at line 183 of Element.cpp
Declaration at line 43 of Element.hpp

Called by: sngxml::dom::BuildIndexVisitor::BeginVisit , sngxml::dom::Element::Write


GetElementsByTagName Member Function

NodeList sngxml::dom::Element::GetElementsByTagName(const std::u32string& tagName)

Definition at line 239 of Element.cpp
Declaration at line 48 of Element.hpp

Calls: sngxml::dom::Element::Accept


HasAttributes Member Function

bool sngxml::dom::Element::HasAttributes() const override

Definition at line 101 of Element.cpp
Declaration at line 41 of Element.hpp

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


HasMultilineContent Member Function

bool sngxml::dom::Element::HasMultilineContent()

Definition at line 171 of Element.cpp
Declaration at line 53 of Element.hpp

Calls: sngxml::dom::Node::GetNodeType , sngxml::dom::Node::ValueContainsNewLine , sngxml::dom::ParentNode::FirstChild , sngxml::dom::ParentNode::LastChild

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


RemoveAttribute Member Function

void sngxml::dom::Element::RemoveAttribute(const std::u32string& attrName)

Definition at line 203 of Element.cpp
Declaration at line 46 of Element.hpp


SetAttribute Member Function

void sngxml::dom::Element::SetAttribute(const std::u32string& attrName, const std::u32string& attrValue)

Definition at line 198 of Element.cpp
Declaration at line 45 of Element.hpp


TagName Member Function

const std::u32string& sngxml::dom::Element::TagName() const

Definition at line 40 of Element.hpp

Calls: sngxml::dom::Node::Name


WalkAttribute Member Function

void sngxml::dom::Element::WalkAttribute(NodeOp & nodeOp) override

Definition at line 208 of Element.cpp
Declaration at line 47 of Element.hpp

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

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


Write Member Function

void sngxml::dom::Element::Write(CodeFormatter& formatter) override

Definition at line 106 of Element.cpp
Declaration at line 42 of Element.hpp

Base class overridden functions: sngxml::dom::Node::Write , sngxml::dom::ParentNode::Write

Calls: sngxml::dom::Element::GetAttribute , sngxml::dom::Element::HasMultilineContent , sngxml::dom::Element::Write , sngxml::dom::Element::WriteAttributes , sngxml::dom::Node::Name , sngxml::dom::ParentNode::HasChildNodes , sngxml::dom::ParentNode::Write

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


WriteAttributes Member Function

void sngxml::dom::Element::WriteAttributes(CodeFormatter& formatter)

Definition at line 162 of Element.cpp
Declaration at line 52 of Element.hpp

Calls: sngxml::dom::Element::Write

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


operator= Member Function

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

Definition at line 38 of Element.hpp


operator= Member Function

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

Definition at line 36 of Element.hpp


top | up | prev | next