top | up | prev | next

NamespaceNode Class

Definition at line 30 of Namespace.hpp

Constructors

NamespaceNode(const Span& span_, const boost::uuids::uuid& moduleId_)
NamespaceNode(const Span& span_, const boost::uuids::uuid& moduleId_, IdentifierNode* id_)

Member Functions

void Accept(Visitor& visitor) override
void AddMember(Node* member)
Node* Clone(CloneContext& cloneContext) const override
bool HasUnnamedNs() const
IdentifierNode* Id() const
bool IsUnnamedNs() const
NodeList<Node>& Members()
const NodeList<Node>& Members() const
void Read(AstReader& reader) override
void SetHasUnnamedNs()
void SetUnnamedNs()
void Write(AstWriter& writer) override

Member Variables

NsFlags flags
std::unique_ptr<IdentifierNode> id
NodeList<Node> members

Constructor Details

NamespaceNode Constructor

sngcm::ast::NamespaceNode::NamespaceNode(const Span& span_, const boost::uuids::uuid& moduleId_)

Definition at line 19 of Namespace.cpp :
 19 : Node(NodeType::namespaceNodespan_moduleId_)id()flags()
 20 {
 21 }


Declaration at line 33 of Namespace.hpp


NamespaceNode Constructor

sngcm::ast::NamespaceNode::NamespaceNode(const Span& span_, const boost::uuids::uuid& moduleId_, IdentifierNode * id_)

Definition at line 23 of Namespace.cpp
Declaration at line 34 of Namespace.hpp


Member Function Details

Accept Member Function

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

Definition at line 74 of Namespace.cpp :
 75 {
 76     visitor.Visit(*this);
 77 }


Declaration at line 36 of Namespace.hpp

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

Calls: sngcm::ast::Visitor::Visit

Called by: sngcm::ast::ClassMemberArranger::Visit , sngcm::ast::NamespaceCombiner::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::UnnamedNamespaceProcessor::Visit


AddMember Member Function

void sngcm::ast::NamespaceNode::AddMember(Node * member)

Definition at line 97 of Namespace.cpp
Declaration at line 39 of Namespace.hpp

Calls: sngcm::ast::NamespaceNode::HasUnnamedNs , sngcm::ast::NamespaceNode::IsUnnamedNs , sngcm::ast::NamespaceNode::SetHasUnnamedNs , sngcm::ast::Node::GetNodeType , sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Add

Called by: sngcm::ast::MergeVisitor::Visit , sngcm::ast::MergeVisitor::Visit , sngcm::ast::NamespaceNode::Clone


Clone Member Function

Node * sngcm::ast::NamespaceNode::Clone(CloneContext & cloneContext) const override

Definition at line 44 of Namespace.cpp
Declaration at line 35 of Namespace.hpp

Base class overridden functions: sngcm::ast::Node::Clone

Calls: sngcm::ast::CloneContext::AddUnitTestFunction , sngcm::ast::CloneContext::MakeTestUnits , sngcm::ast::NamespaceNode::AddMember , sngcm::ast::NamespaceNode::Clone , sngcm::ast::NamespaceNode::IsUnnamedNs , sngcm::ast::Node::Clone , sngcm::ast::Node::GetNodeType , sngcm::ast::Node::GetSpan , sngcm::ast::Node::GetSpecifiers , sngcm::ast::Node::ModuleId , sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Count

Called by: sngcm::ast::MergeVisitor::Visit , sngcm::ast::NamespaceNode::Clone


HasUnnamedNs Member Function

bool sngcm::ast::NamespaceNode::HasUnnamedNs() const

Definition at line 45 of Namespace.hpp :
45 { return (flags & NsFlags::hasUnnamedNs) != NsFlags::none; }

Called by: sngcm::ast::NamespaceNode::AddMember


Id Member Function

IdentifierNode * sngcm::ast::NamespaceNode::Id() const

Definition at line 39 of Namespace.cpp :
 40 {
 41     return id.get();
 42 }


Declaration at line 40 of Namespace.hpp

Called by: sngcm::ast::MergeVisitor::Visit , sngcm::ast::NamespaceCombiner::Visit , sngcm::ast::NodeSelectorVisitor::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::UnnamedNamespaceProcessor::Visit


IsUnnamedNs Member Function

bool sngcm::ast::NamespaceNode::IsUnnamedNs() const

Definition at line 43 of Namespace.hpp :
43 { return (flags & NsFlags::isUnnamedNs) != NsFlags::none; }

Called by: sngcm::ast::NamespaceNode::AddMember , sngcm::ast::NamespaceNode::Clone , sngcm::ast::SourceWriter::Visit , sngcm::ast::UnnamedNamespaceProcessor::Visit


Members Member Function

NodeList <Node >& sngcm::ast::NamespaceNode::Members()

Definition at line 41 of Namespace.hpp :
41 { return members; }

Called by: sngcm::ast::ClassMemberArranger::Visit , sngcm::ast::MergeVisitor::Visit , sngcm::ast::NamespaceCombiner::Visit , sngcm::ast::NodeSelectorVisitor::Visit , sngcm::ast::SourceWriter::Visit , sngcm::ast::UnnamedNamespaceProcessor::Visit , sngcm::ast::UnnamedNamespaceProcessor::Visit


Members Member Function

const NodeList <Node >& sngcm::ast::NamespaceNode::Members() const

Definition at line 42 of Namespace.hpp :
42 { return members; }


Read Member Function

void sngcm::ast::NamespaceNode::Read(AstReader & reader) override

Definition at line 87 of Namespace.cpp :
 88 {
 89     Node::Read(reader);
 90     id.reset(reader.ReadIdentifierNode());
 91     id->SetParent(this);
 92     flags = static_cast<NsFlags>(reader.GetBinaryReader().ReadSByte());
 93     members.Read(reader);
 94     members.SetParent(this);
 95 }


Declaration at line 38 of Namespace.hpp

Base class overridden functions: sngcm::ast::Node::Read

Calls: sngcm::ast::AstReader::GetBinaryReader , sngcm::ast::AstReader::ReadIdentifierNode , sngcm::ast::Node::Read , sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Read , sngcm::ast::NodeList::SetParent , soulng::util::BinaryReader::ReadSByte


SetHasUnnamedNs Member Function

void sngcm::ast::NamespaceNode::SetHasUnnamedNs()

Definition at line 46 of Namespace.hpp :
46 { flags = flags | NsFlags::hasUnnamedNs; }

Called by: sngcm::ast::NamespaceNode::AddMember


SetUnnamedNs Member Function

void sngcm::ast::NamespaceNode::SetUnnamedNs()

Definition at line 44 of Namespace.hpp :
44 { flags = flags | NsFlags::isUnnamedNs; }


Write Member Function

void sngcm::ast::NamespaceNode::Write(AstWriter & writer) override

Definition at line 79 of Namespace.cpp :
 80 {
 81     Node::Write(writer);
 82     writer.Write(id.get());
 83     writer.GetBinaryWriter().Write(static_cast<int8_t>(flags));
 84     members.Write(writer);
 85 }


Declaration at line 37 of Namespace.hpp

Base class overridden functions: sngcm::ast::Node::Write

Calls: sngcm::ast::AstWriter::GetBinaryWriter , sngcm::ast::Node::Write , sngcm::ast::NodeList::Write


top | up | prev | next