top | up | prev | next

TemplateIdNode Class

Definition at line 15 of Template.hpp

Constructors

TemplateIdNode(const Span& span_, const boost::uuids::uuid& moduleId_)
TemplateIdNode(const Span& span_, const boost::uuids::uuid& moduleId_, 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_, const boost::uuids::uuid& moduleId_)

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


Declaration at line 18 of Template.hpp


TemplateIdNode Constructor

sngcm::ast::TemplateIdNode::TemplateIdNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node * primary_)

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


Declaration at line 19 of Template.hpp


Member Function Details

Accept Member Function

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

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


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 72 of Template.cpp :
 73 {
 74     templateArgument->SetParent(this);
 75     templateArguments.Add(templateArgument);
 76 }


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


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::Node::ModuleId , 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 46 of Template.cpp :
 47 {
 48     Node::Read(reader);
 49     primary.reset(reader.ReadNode());
 50     primary->SetParent(this);
 51     templateArguments.Read(reader);
 52     templateArguments.SetParent(this);
 53 }


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 55 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 39 of Template.cpp :
 40 {
 41     Node::Write(writer);
 42     writer.Write(primary.get());
 43     templateArguments.Write(writer);
 44 }


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