top | up | prev | next

ClassDelegateNode Class

Definition at line 35 of Delegate.hpp

Constructors

ClassDelegateNode(const Span& span_, const boost::uuids::uuid& moduleId_)
ClassDelegateNode(const Span& span_, const boost::uuids::uuid& moduleId_, 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_, const boost::uuids::uuid& moduleId_)

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


Declaration at line 38 of Delegate.hpp


ClassDelegateNode Constructor

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

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


Declaration at line 39 of Delegate.hpp


Member Function Details

Accept Member Function

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

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


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 115 of Delegate.cpp :
116 {
117     parameter->SetParent(this);
118     parameters.Add(parameter);
119 }


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


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::Node::ModuleId , 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 103 of Delegate.cpp :
104 {
105     Node::Read(reader);
106     specifiers = reader.ReadSpecifiers();
107     returnTypeExpr.reset(reader.ReadNode());
108     returnTypeExpr->SetParent(this);
109     id.reset(reader.ReadIdentifierNode());
110     id->SetParent(this);
111     parameters.Read(reader);
112     parameters.SetParent(this);
113 }


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 94 of Delegate.cpp :
 95 {
 96     Node::Write(writer);
 97     writer.Write(specifiers);
 98     writer.Write(returnTypeExpr.get());
 99     writer.Write(id.get());
100     parameters.Write(writer);
101 }


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