top | up | prev | next

NamespaceNode Class

Definition at line 12 of Namespace.hpp

Constructors

NamespaceNode()
NamespaceNode(const Span& span_)
NamespaceNode(const Span& span_, const std::u32string& namespaceName_)

Member Functions

void Accept(Visitor& visitor) override
void AddMember(const Span& span, Node* member)
const std::u32string& NamespaceName() const
void Read(Reader& reader) override
void Write(Writer& writer) override

Member Variables

std::u32string namespaceName

Constructor Details

NamespaceNode Constructor

sngcpp::ast::NamespaceNode::NamespaceNode()

Definition at line 13 of Namespace.cpp :
13 : UnaryNode(NodeType::namespaceNode)
14 {
15 }


Declaration at line 15 of Namespace.hpp


NamespaceNode Constructor

sngcpp::ast::NamespaceNode::NamespaceNode(const Span& span_)

Definition at line 17 of Namespace.cpp :
17 : UnaryNode(NodeType::namespaceNodespan_)namespaceName()
18 {
19 }


Declaration at line 16 of Namespace.hpp


NamespaceNode Constructor

sngcpp::ast::NamespaceNode::NamespaceNode(const Span& span_, const std::u32string& namespaceName_)

Definition at line 21 of Namespace.cpp :
21 : UnaryNode(NodeType::namespaceNodespan_)namespaceName(namespaceName_)
22 {
23 }


Declaration at line 17 of Namespace.hpp


Member Function Details

Accept Member Function

void sngcpp::ast::NamespaceNode::Accept(Visitor & visitor) override

Definition at line 25 of Namespace.cpp :
26 {
27     visitor.Visit(*this);
28 }


Declaration at line 18 of Namespace.hpp

Base class overridden functions: sngcpp::ast::Node::Accept

Calls: sngcpp::ast::Visitor::Visit


AddMember Member Function

void sngcpp::ast::NamespaceNode::AddMember(const Span& span, Node * member)

Definition at line 42 of Namespace.cpp :
43 {
44     if (Child())
45     {
46         SetChild(new DeclarationSequenceNode(spanReleaseChild()member));
47     }
48     else
49     {
50         SetChild(member);
51     }
52 }


Declaration at line 22 of Namespace.hpp

Calls: sngcpp::ast::UnaryNode::Child , sngcpp::ast::UnaryNode::ReleaseChild , sngcpp::ast::UnaryNode::SetChild


NamespaceName Member Function

const std::u32string& sngcpp::ast::NamespaceNode::NamespaceName() const

Definition at line 21 of Namespace.hpp :
21 { return namespaceName; }


Read Member Function

void sngcpp::ast::NamespaceNode::Read(Reader & reader) override

Definition at line 36 of Namespace.cpp :
37 {
38     UnaryNode::Read(reader);
39     namespaceName = reader.GetBinaryReader().ReadUtf32String();
40 }


Declaration at line 20 of Namespace.hpp

Base class overridden functions: sngcpp::ast::Node::Read , sngcpp::ast::UnaryNode::Read

Calls: sngcpp::ast::Reader::GetBinaryReader , sngcpp::ast::UnaryNode::Read


Write Member Function

void sngcpp::ast::NamespaceNode::Write(Writer & writer) override

Definition at line 30 of Namespace.cpp :
31 {
32     UnaryNode::Write(writer);
33     writer.GetBinaryWriter().Write(namespaceName);
34 }


Declaration at line 19 of Namespace.hpp

Base class overridden functions: sngcpp::ast::Node::Write , sngcpp::ast::UnaryNode::Write

Calls: sngcpp::ast::NamespaceNode::Write , sngcpp::ast::UnaryNode::Write , sngcpp::ast::Writer::GetBinaryWriter

Called by: sngcpp::ast::NamespaceNode::Write


top | up | prev | next