top | up | prev | next

TemplateIdNode Class

Definition at line 61 of Template.hpp

Constructors

TemplateIdNode()
TemplateIdNode(const Span& span_, IdentifierNode* id_, Node* templateArguments_, int arity_)

Member Functions

void Accept(Visitor& visitor) override
int Arity() const
IdentifierNode* Id()
bool IsTemplateIdNode() const override
void Read(Reader& reader) override
Node* TemplateArguments()
void Write(Writer& writer) override

Member Variables

int arity
std::unique_ptr<IdentifierNode> id
std::unique_ptr<Node> templateArguments

Constructor Details

TemplateIdNode Constructor

sngcpp::ast::TemplateIdNode::TemplateIdNode()

Definition at line 105 of Template.cpp :
105 : Node(NodeType::templateIdNode)arity(0)
106 {
107 }


Declaration at line 64 of Template.hpp


TemplateIdNode Constructor

sngcpp::ast::TemplateIdNode::TemplateIdNode(const Span& span_, IdentifierNode * id_, Node * templateArguments_, int arity_)

Definition at line 109 of Template.cpp :
109 :
110 Node(NodeType::templateIdNodespan_)id(id_)templateArguments(templateArguments_)arity(arity_)
111 {
112 }


Declaration at line 65 of Template.hpp


Member Function Details

Accept Member Function

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

Definition at line 114 of Template.cpp :
115 {
116     visitor.Visit(*this);
117 }


Declaration at line 67 of Template.hpp

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

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


Arity Member Function

int sngcpp::ast::TemplateIdNode::Arity() const

Definition at line 72 of Template.hpp :
 72 { return arity; }


Id Member Function

IdentifierNode * sngcpp::ast::TemplateIdNode::Id()

Definition at line 70 of Template.hpp :
 70 { return id.get(); }


IsTemplateIdNode Member Function

bool sngcpp::ast::TemplateIdNode::IsTemplateIdNode() const override

Definition at line 66 of Template.hpp :
 66 { return true; }

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


Read Member Function

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

Definition at line 132 of Template.cpp :
133 {
134     Node::Read(reader);
135     id.reset(reader.ReadIdentifierNode());
136     bool hasTemplateArguments = reader.GetBinaryReader().ReadBool();
137     if (hasTemplateArguments)
138     {
139         templateArguments.reset(reader.ReadNode());
140     }
141     arity = reader.GetBinaryReader().ReadInt();
142 }


Declaration at line 69 of Template.hpp

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

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


TemplateArguments Member Function

Node * sngcpp::ast::TemplateIdNode::TemplateArguments()

Definition at line 71 of Template.hpp :
 71 { return templateArguments.get(); }


Write Member Function

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

Definition at line 119 of Template.cpp
Declaration at line 68 of Template.hpp

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

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

Called by: sngcpp::ast::TemplateIdNode::Write


top | up | prev | next