top | up | prev | next

ConstructNode Class

Definition at line 491 of Expression.hpp

Constructors

ConstructNode(const Span& span_, const boost::uuids::uuid& moduleId_)
ConstructNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node* typeExpr_)

Member Functions

void Accept(Visitor& visitor) override
void AddArgument(Node* argument) override
const NodeList<Node>& Arguments() const
Node* Clone(CloneContext& cloneContext) const override
void Read(AstReader& reader) override
std::string ToString() const override
const Node* TypeExpr() const
Node* TypeExpr()
void Write(AstWriter& writer) override

Member Variables

NodeList<Node> arguments
std::unique_ptr<Node> typeExpr

Constructor Details

ConstructNode Constructor

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

Definition at line 1186 of Expression.cpp :
1186 : Node(NodeType::constructNodespan_moduleId_)typeExpr()arguments()
1187 {
1188 }


Declaration at line 494 of Expression.hpp


ConstructNode Constructor

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

Definition at line 1190 of Expression.cpp :
1190 :
1191 Node(NodeType::constructNodespan_moduleId_)typeExpr(typeExpr_)arguments()
1192 {
1193     typeExpr->SetParent(this);
1194 }


Declaration at line 495 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 1208 of Expression.cpp :
1209 {
1210     visitor.Visit(*this);
1211 }


Declaration at line 497 of Expression.hpp

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

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


AddArgument Member Function

void sngcm::ast::ConstructNode::AddArgument(Node * argument) override

Definition at line 1229 of Expression.cpp :
1230 {
1231     argument->SetParent(this);
1232     arguments.Add(argument);
1233 }


Declaration at line 500 of Expression.hpp

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

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

Called by: sngcm::ast::ConstructNode::Clone


Arguments Member Function

const NodeList <Node >& sngcm::ast::ConstructNode::Arguments() const

Definition at line 503 of Expression.hpp :
503 { return arguments; }

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


Clone Member Function

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

Definition at line 1196 of Expression.cpp :
1197 {
1198     ConstructNode* clone = new ConstructNode(GetSpan()ModuleId()typeExpr->Clone(cloneContext));
1199     int n = arguments.Count();
1200     for (int i = 0; i < n; ++i)
1201     {
1202         Node* argument = arguments[i];
1203         clone->AddArgument(argument->Clone(cloneContext));
1204     }
1205     return clone;
1206 }


Declaration at line 496 of Expression.hpp

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

Calls: sngcm::ast::ConstructNode::AddArgument , sngcm::ast::ConstructNode::Clone , sngcm::ast::Node::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId , sngcm::ast::NodeList::Count

Called by: sngcm::ast::ConstructNode::Clone


Read Member Function

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

Definition at line 1220 of Expression.cpp :
1221 {
1222     Node::Read(reader);
1223     typeExpr.reset(reader.ReadNode());
1224     typeExpr->SetParent(this);
1225     arguments.Read(reader);
1226     arguments.SetParent(this);
1227 }


Declaration at line 499 of Expression.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


ToString Member Function

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

Definition at line 1235 of Expression.cpp
Declaration at line 504 of Expression.hpp

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

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

Called by: sngcm::ast::ConstructNode::ToString


TypeExpr Member Function

const Node * sngcm::ast::ConstructNode::TypeExpr() const

Definition at line 501 of Expression.hpp :
501 { return typeExpr.get(); }


TypeExpr Member Function

Node * sngcm::ast::ConstructNode::TypeExpr()

Definition at line 502 of Expression.hpp :
502 { return typeExpr.get(); }

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


Write Member Function

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

Definition at line 1213 of Expression.cpp :
1214 {
1215     Node::Write(writer);
1216     writer.Write(typeExpr.get());
1217     arguments.Write(writer);
1218 }


Declaration at line 498 of Expression.hpp

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

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


top | up | prev | next