top | up | prev | next

TemplateIdNode Class

Definition at line 15 of Template.hpp

Constructors

TemplateIdNode(const Span& span_)
TemplateIdNode(const Span& span_, Node* primary_)

Member Functions

void Accept(Visitor& visitor) override
void AddTemplateArgument(Node* templateArgument)
Node* Clone(CloneContext& cloneContext) const override
Node* Primary()
void Read(AstReader& reader) override
const NodeList<Node>& TemplateArguments() const
std::string ToString() const override
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<Node> primary
NodeList<Node> templateArguments

Constructor Details

TemplateIdNode Constructor

sngcm::ast::TemplateIdNode::TemplateIdNode(const Span& span_)

Definition at line 12 of Template.cpp :
 12 : Node(NodeType::templateIdNodespan_)
 13 {
 14 }


Declaration at line 18 of Template.hpp


TemplateIdNode Constructor

sngcm::ast::TemplateIdNode::TemplateIdNode(const Span& span_, Node * primary_)

Definition at line 16 of Template.cpp :
 16 : Node(NodeType::templateIdNodespan_)primary(primary_)
 17 {
 18     primary->SetParent(this);
 19 }


Declaration at line 19 of Template.hpp


Member Function Details

Accept Member Function

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

Definition at line 33 of Template.cpp :
 34 {
 35     visitor.Visit(*this);
 36 }


Declaration at line 21 of Template.hpp

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

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


AddTemplateArgument Member Function

void sngcm::ast::TemplateIdNode::AddTemplateArgument(Node * templateArgument)

Definition at line 71 of Template.cpp :
 72 {
 73     templateArgument->SetParent(this);
 74     templateArguments.Add(templateArgument);
 75 }


Declaration at line 26 of Template.hpp

Calls: sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Add

Called by: sngcm::ast::TemplateIdNode::Clone


Clone Member Function

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

Definition at line 21 of Template.cpp :
 22 {
 23     TemplateIdNode* clone = new TemplateIdNode(GetSpan()primary->Clone(cloneContext));
 24     int n = templateArguments.Count();
 25     for (int i = 0; i < n; ++i)
 26     {
 27         Node* templateArgument = templateArguments[i];
 28         clone->AddTemplateArgument(templateArgument->Clone(cloneContext));
 29     }
 30     return clone;
 31 }


Declaration at line 20 of Template.hpp

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

Calls: sngcm::ast::Node::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::NodeList::Count , sngcm::ast::TemplateIdNode::AddTemplateArgument , sngcm::ast::TemplateIdNode::Clone

Called by: sngcm::ast::TemplateIdNode::Clone


Primary Member Function

Node * sngcm::ast::TemplateIdNode::Primary()

Definition at line 25 of Template.hpp :
25 { return primary.get(); }

Called by: sngcm::ast::SourceWriter::Visit


Read Member Function

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

Definition at line 45 of Template.cpp :
 46 {
 47     Node::Read(reader);
 48     primary.reset(reader.ReadNode());
 49     primary->SetParent(this);
 50     templateArguments.Read(reader);
 51     templateArguments.SetParent(this);
 52 }


Declaration at line 23 of Template.hpp

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

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::Read , sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Read , sngcm::ast::NodeList::SetParent


TemplateArguments Member Function

const NodeList <Node >& sngcm::ast::TemplateIdNode::TemplateArguments() const

Definition at line 27 of Template.hpp :
27 { return templateArguments; }

Called by: sngcm::ast::SourceWriter::Visit


ToString Member Function

std::string sngcm::ast::TemplateIdNode::ToString() const override

Definition at line 54 of Template.cpp
Declaration at line 24 of Template.hpp

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

Calls: sngcm::ast::NodeList::Count , sngcm::ast::TemplateIdNode::ToString

Called by: sngcm::ast::TemplateIdNode::ToString


Write Member Function

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

Definition at line 38 of Template.cpp :
 39 {
 40     Node::Write(writer);
 41     writer.Write(primary.get());
 42     templateArguments.Write(writer);
 43 }


Declaration at line 22 of Template.hpp

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

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


top | up | prev | next