top | up | prev | next

LinkageSpecificationNode Class

Definition at line 95 of Declaration.hpp

Constructors

LinkageSpecificationNode()
LinkageSpecificationNode(const Span& span_, StringLiteralNode* language_)

Member Functions

void Accept(Visitor& visitor) override
void AddDeclaration(const Span& span_, Node* declaration)
Node* Declarations()
StringLiteralNode* Language()
void Read(Reader& reader) override
void Write(Writer& writer) override

Member Variables

std::unique_ptr<Node> declarations
std::unique_ptr<StringLiteralNode> language

Constructor Details

LinkageSpecificationNode Constructor

sngcpp::ast::LinkageSpecificationNode::LinkageSpecificationNode()

Definition at line 169 of Declaration.cpp :
169 : Node(NodeType::linkageSpecificationNode)
170 {
171 }


Declaration at line 98 of Declaration.hpp


LinkageSpecificationNode Constructor

sngcpp::ast::LinkageSpecificationNode::LinkageSpecificationNode(const Span& span_, StringLiteralNode * language_)

Definition at line 173 of Declaration.cpp :
173 : Node(NodeType::linkageSpecificationNodespan_)language(language_)
174 {
175 }


Declaration at line 99 of Declaration.hpp


Member Function Details

Accept Member Function

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

Definition at line 177 of Declaration.cpp :
178 {
179     visitor.Visit(*this);
180 }


Declaration at line 100 of Declaration.hpp

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

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


AddDeclaration Member Function

void sngcpp::ast::LinkageSpecificationNode::AddDeclaration(const Span& span_, Node * declaration)

Definition at line 204 of Declaration.cpp :
205 {
206     if (declarations)
207     {
208         declarations.reset(new DeclarationSequenceNode(span_declarations.release()declaration));
209     }
210     else
211     {
212         declarations.reset(declaration);
213     }
214 }


Declaration at line 105 of Declaration.hpp


Declarations Member Function

Node * sngcpp::ast::LinkageSpecificationNode::Declarations()

Definition at line 104 of Declaration.hpp :
104 { return declarations.get(); }


Language Member Function

StringLiteralNode * sngcpp::ast::LinkageSpecificationNode::Language()

Definition at line 103 of Declaration.hpp :
103 { return language.get(); }


Read Member Function

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

Definition at line 193 of Declaration.cpp :
194 {
195     Node::Read(reader);
196     language.reset(reader.ReadStringLiteralNode());
197     bool hasDeclarations = reader.GetBinaryReader().ReadBool();
198     if (hasDeclarations)
199     {
200         declarations.reset(reader.ReadNode());
201     }
202 }


Declaration at line 102 of Declaration.hpp

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

Calls: sngcpp::ast::Node::Read , sngcpp::ast::Reader::GetBinaryReader , sngcpp::ast::Reader::ReadNode , sngcpp::ast::Reader::ReadStringLiteralNode


Write Member Function

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

Definition at line 182 of Declaration.cpp :
183 {
184     Node::Write(writer);
185     language->Write(writer);
186     writer.GetBinaryWriter().Write(declarations != nullptr);
187     if (declarations)
188     {
189         declarations->Write(writer);
190     }
191 }


Declaration at line 101 of Declaration.hpp

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

Calls: sngcpp::ast::LinkageSpecificationNode::Write , sngcpp::ast::Node::Write , sngcpp::ast::Writer::GetBinaryWriter

Called by: sngcpp::ast::LinkageSpecificationNode::Write


top | up | prev | next