top | up | prev | next

ClassDelegateNode Class

Definition at line 35 of Delegate.hpp

Constructors

ClassDelegateNode(const Span& span_)
ClassDelegateNode(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

ClassDelegateNode Constructor

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

Definition at line 66 of Delegate.cpp :
 66 : Node(NodeType::classDelegateNodespan_)specifiers(Specifiers::none)returnTypeExpr()id()parameters()
 67 {
 68 }


Declaration at line 38 of Delegate.hpp


ClassDelegateNode Constructor

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

Definition at line 70 of Delegate.cpp :
 70 :
 71 Node(NodeType::classDelegateNodespan_)specifiers(specifiers_)returnTypeExpr(returnTypeExpr_)id(id_)parameters()
 72 {
 73     returnTypeExpr->SetParent(this);
 74     id->SetParent(this);
 75 }


Declaration at line 39 of Delegate.hpp


Member Function Details

Accept Member Function

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

Definition at line 88 of Delegate.cpp :
 89 {
 90     visitor.Visit(*this);
 91 }


Declaration at line 41 of Delegate.hpp

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

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


AddParameter Member Function

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

Definition at line 114 of Delegate.cpp :
115 {
116     parameter->SetParent(this);
117     parameters.Add(parameter);
118 }


Declaration at line 44 of Delegate.hpp

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

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

Called by: sngcm::ast::ClassDelegateNode::Clone


Clone Member Function

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

Definition at line 77 of Delegate.cpp :
 78 {
 79     ClassDelegateNode* clone = new ClassDelegateNode(GetSpan()specifiersreturnTypeExpr->Clone(cloneContext)static_cast<IdentifierNode*>(id->Clone(cloneContext)));
 80     int n = parameters.Count();
 81     for (int i = 0; i < n; ++i)
 82     {
 83         clone->AddParameter(static_cast<ParameterNode*>(parameters[i]->Clone(cloneContext)));
 84     }
 85     return clone;
 86 }


Declaration at line 40 of Delegate.hpp

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

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

Called by: sngcm::ast::ClassDelegateNode::Clone


GetSpecifiers Member Function

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

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

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

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


Id Member Function

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

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

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


Parameters Member Function

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

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

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


Read Member Function

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

Definition at line 102 of Delegate.cpp :
103 {
104     Node::Read(reader);
105     specifiers = reader.ReadSpecifiers();
106     returnTypeExpr.reset(reader.ReadNode());
107     returnTypeExpr->SetParent(this);
108     id.reset(reader.ReadIdentifierNode());
109     id->SetParent(this);
110     parameters.Read(reader);
111     parameters.SetParent(this);
112 }


Declaration at line 43 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::ClassDelegateNode::ReturnTypeExpr() const

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

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


Write Member Function

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

Definition at line 93 of Delegate.cpp :
 94 {
 95     Node::Write(writer);
 96     writer.Write(specifiers);
 97     writer.Write(returnTypeExpr.get());
 98     writer.Write(id.get());
 99     parameters.Write(writer);
100 }


Declaration at line 42 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