top | up | prev | next

DefaultStatementNode Class

Definition at line 441 of Statement.hpp

Constructors

DefaultStatementNode(const Span& span_)

Member Functions

void Accept(Visitor& visitor) override
void AddStatement(StatementNode* statement)
Node* Clone(CloneContext& cloneContext) const override
void Read(AstReader& reader) override
const NodeList<StatementNode>& Statements() const
void Write(AstWriter& writer) override

Member Variables

NodeList<StatementNode> statements

Constructor Details

DefaultStatementNode Constructor

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

Definition at line 901 of Statement.cpp :
 901 : StatementNode(NodeType::defaultStatementNodespan_)statements()
 902 {
 903 }


Declaration at line 444 of Statement.hpp


Member Function Details

Accept Member Function

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

Definition at line 916 of Statement.cpp :
 917 {
 918     visitor.Visit(*this);
 919 }


Declaration at line 446 of Statement.hpp

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

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

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


AddStatement Member Function

void sngcm::ast::DefaultStatementNode::AddStatement(StatementNode * statement)

Definition at line 934 of Statement.cpp :
 935 {
 936     statement->SetParent(this);
 937     statements.Add(statement);
 938 }


Declaration at line 450 of Statement.hpp

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

Called by: sngcm::ast::DefaultStatementNode::Clone


Clone Member Function

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

Definition at line 905 of Statement.cpp :
 906 {
 907     DefaultStatementNode* clone = new DefaultStatementNode(GetSpan());
 908     int n = statements.Count();
 909     for (int i = 0; i < n; ++i)
 910     {
 911         clone->AddStatement(static_cast<StatementNode*>(statements[i]->Clone(cloneContext)));
 912     }
 913     return clone;
 914 }


Declaration at line 445 of Statement.hpp

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

Calls: sngcm::ast::DefaultStatementNode::AddStatement , sngcm::ast::DefaultStatementNode::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::NodeList::Count

Called by: sngcm::ast::DefaultStatementNode::Clone


Read Member Function

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

Definition at line 927 of Statement.cpp :
 928 {
 929     StatementNode::Read(reader);
 930     statements.Read(reader);
 931     statements.SetParent(this);
 932 }


Declaration at line 448 of Statement.hpp

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

Calls: sngcm::ast::NodeList::Read , sngcm::ast::NodeList::SetParent , sngcm::ast::StatementNode::Read


Statements Member Function

const NodeList <StatementNode >& sngcm::ast::DefaultStatementNode::Statements() const

Definition at line 449 of Statement.hpp :
449 { return statements; }

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


Write Member Function

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

Definition at line 921 of Statement.cpp :
 922 {
 923     StatementNode::Write(writer);
 924     statements.Write(writer);
 925 }


Declaration at line 447 of Statement.hpp

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

Calls: sngcm::ast::NodeList::Write , sngcm::ast::StatementNode::Write


top | up | prev | next