top | up | prev | next

DelegateNode Class

Definition at line 14 of Delegate.hpp

Constructors

DelegateNode(const Span& span_)
DelegateNode(const Span& span_, Specifiers specifiers_, Node* returnTypeExpr_, IdentifierNode* id_)

Member Functions

void Accept(Visitor& visitor) override
void AddParameter(ParameterNode* parameter) override
Node* Clone(CloneContext& cloneContext) const override
Specifiers GetSpecifiers() const override
IdentifierNode* Id() const
const NodeList<ParameterNode>& Parameters() const
void Read(AstReader& reader) override
Node* ReturnTypeExpr() const
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<IdentifierNode> id
NodeList<ParameterNode> parameters
std::unique_ptr<Node> returnTypeExpr
Specifiers specifiers

Constructor Details

DelegateNode Constructor

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

Definition at line 12 of Delegate.cpp :
 12 : Node(NodeType::delegateNodespan_)specifiers(Specifiers::none)returnTypeExpr()id()parameters()
 13 {
 14 }


Declaration at line 17 of Delegate.hpp


DelegateNode Constructor

sngcm::ast::DelegateNode::DelegateNode(const Span& span_, Specifiers specifiers_, Node * returnTypeExpr_, IdentifierNode * id_)

Definition at line 16 of Delegate.cpp :
 16 :
 17 Node(NodeType::delegateNodespan_)specifiers(specifiers_)returnTypeExpr(returnTypeExpr_)id(id_)parameters()
 18 {
 19     returnTypeExpr->SetParent(this);
 20     id->SetParent(this);
 21 }


Declaration at line 18 of Delegate.hpp


Member Function Details

Accept Member Function

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

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


Declaration at line 20 of Delegate.hpp

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

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


AddParameter Member Function

void sngcm::ast::DelegateNode::AddParameter(ParameterNode * parameter) override

Definition at line 60 of Delegate.cpp :
 61 {
 62     parameter->SetParent(this);
 63     parameters.Add(parameter);
 64 }


Declaration at line 23 of Delegate.hpp

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

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

Called by: sngcm::ast::DelegateNode::Clone


Clone Member Function

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

Definition at line 23 of Delegate.cpp :
 24 {
 25     DelegateNode* clone = new DelegateNode(GetSpan()specifiersreturnTypeExpr->Clone(cloneContext)static_cast<IdentifierNode*>(id->Clone(cloneContext)));
 26     int n = parameters.Count();
 27     for (int i = 0; i < n; ++i)
 28     {
 29         clone->AddParameter(static_cast<ParameterNode*>(parameters[i]->Clone(cloneContext)));
 30     }
 31     return clone;
 32 }


Declaration at line 19 of Delegate.hpp

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

Calls: sngcm::ast::DelegateNode::AddParameter , sngcm::ast::DelegateNode::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::NodeList::Count

Called by: sngcm::ast::DelegateNode::Clone


GetSpecifiers Member Function

Specifiers sngcm::ast::DelegateNode::GetSpecifiers() const override

Definition at line 24 of Delegate.hpp :
24 { return specifiers; }

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

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


Id Member Function

IdentifierNode * sngcm::ast::DelegateNode::Id() const

Definition at line 26 of Delegate.hpp :
26 { return id.get(); }

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


Parameters Member Function

const NodeList <ParameterNode >& sngcm::ast::DelegateNode::Parameters() const

Definition at line 27 of Delegate.hpp :
27 { return parameters; }

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


Read Member Function

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

Definition at line 48 of Delegate.cpp :
 49 {
 50     Node::Read(reader);
 51     specifiers = reader.ReadSpecifiers();
 52     returnTypeExpr.reset(reader.ReadNode());
 53     returnTypeExpr->SetParent(this);
 54     id.reset(reader.ReadIdentifierNode());
 55     id->SetParent(this);
 56     parameters.Read(reader);
 57     parameters.SetParent(this);
 58 }


Declaration at line 22 of Delegate.hpp

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

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


ReturnTypeExpr Member Function

Node * sngcm::ast::DelegateNode::ReturnTypeExpr() const

Definition at line 25 of Delegate.hpp :
25 { return returnTypeExpr.get(); }

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


Write Member Function

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

Definition at line 39 of Delegate.cpp :
 40 {
 41     Node::Write(writer);
 42     writer.Write(specifiers);
 43     writer.Write(returnTypeExpr.get());
 44     writer.Write(id.get());
 45     parameters.Write(writer);
 46 }


Declaration at line 21 of Delegate.hpp

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

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


top | up | prev | next