top | up | prev | next

MemberFunctionConstraintNode Class

Definition at line 205 of Concept.hpp

Constructors

MemberFunctionConstraintNode(const Span& span_)
MemberFunctionConstraintNode(const Span& span_, Node* returnTypeExpr_, IdentifierNode* typeParamId_, const std::u32string& groupId_)

Member Functions

void Accept(Visitor& visitor) override
void AddParameter(ParameterNode* parameter) override
Node* Clone(CloneContext& cloneContext) const override
const std::u32string& GroupId() const
const NodeList<ParameterNode>& Parameters() const
void Read(AstReader& reader) override
const Node* ReturnTypeExpr() const
Node* ReturnTypeExpr()
std::string ToString() const override
const IdentifierNode* TypeParamId() const
IdentifierNode* TypeParamId()
void Write(AstWriter& writer) override

Member Variables

std::u32string groupId
NodeList<ParameterNode> parameters
std::unique_ptr<Node> returnTypeExpr
std::unique_ptr<IdentifierNode> typeParamId

Constructor Details

MemberFunctionConstraintNode Constructor

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

Definition at line 468 of Concept.cpp :
 468 :
 469 SignatureConstraintNode(NodeType::memberFunctionConstraintNodespan_)returnTypeExpr()typeParamId()groupId()parameters()
 470 {
 471 }


Declaration at line 208 of Concept.hpp


MemberFunctionConstraintNode Constructor

sngcm::ast::MemberFunctionConstraintNode::MemberFunctionConstraintNode(const Span& span_, Node * returnTypeExpr_, IdentifierNode * typeParamId_, const std::u32string& groupId_)

Definition at line 473 of Concept.cpp :
 473 :
 474 SignatureConstraintNode(NodeType::memberFunctionConstraintNodespan_)returnTypeExpr(returnTypeExpr_)typeParamId(typeParamId_)groupId(groupId_)parameters()
 475 {
 476     returnTypeExpr->SetParent(this);
 477     typeParamId->SetParent(this);
 478 }


Declaration at line 209 of Concept.hpp


Member Function Details

Accept Member Function

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

Definition at line 491 of Concept.cpp :
 492 {
 493     visitor.Visit(*this);
 494 }


Declaration at line 211 of Concept.hpp

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

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


AddParameter Member Function

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

Definition at line 517 of Concept.cpp :
 518 {
 519     parameter->SetParent(this);
 520     parameters.Add(parameter);
 521 }


Declaration at line 214 of Concept.hpp

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

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

Called by: sngcm::ast::MemberFunctionConstraintNode::Clone


Clone Member Function

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

Definition at line 480 of Concept.cpp :
 481 {
 482     MemberFunctionConstraintNode* clone = new MemberFunctionConstraintNode(GetSpan()returnTypeExpr->Clone(cloneContext)static_cast<IdentifierNode*>(typeParamId->Clone(cloneContext))groupId);
 483     int n = parameters.Count();
 484     for (int i = 0; i < n; ++i)
 485     {
 486         clone->AddParameter(static_cast<ParameterNode*>(parameters[i]->Clone(cloneContext)));
 487     }
 488     return clone;
 489 }


Declaration at line 210 of Concept.hpp

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

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

Called by: sngcm::ast::MemberFunctionConstraintNode::Clone


GroupId Member Function

const std::u32string& sngcm::ast::MemberFunctionConstraintNode::GroupId() const

Definition at line 219 of Concept.hpp :
219 { return groupId; }

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


Parameters Member Function

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

Definition at line 220 of Concept.hpp :
220 { return parameters; }

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


Read Member Function

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

Definition at line 505 of Concept.cpp :
 506 {
 507     SignatureConstraintNode::Read(reader);
 508     returnTypeExpr.reset(reader.ReadNode());
 509     returnTypeExpr->SetParent(this);
 510     typeParamId.reset(reader.ReadIdentifierNode());
 511     typeParamId->SetParent(this);
 512     groupId = reader.GetBinaryReader().ReadUtf32String();
 513     parameters.Read(reader);
 514     parameters.SetParent(this);
 515 }


Declaration at line 213 of Concept.hpp

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

Calls: sngcm::ast::AstReader::GetBinaryReader , sngcm::ast::AstReader::ReadIdentifierNode , sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::Read , sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Read , sngcm::ast::NodeList::SetParent , soulng::util::BinaryReader::ReadUtf32String


ReturnTypeExpr Member Function

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

Definition at line 215 of Concept.hpp :
215 { return returnTypeExpr.get(); }


ReturnTypeExpr Member Function

Node * sngcm::ast::MemberFunctionConstraintNode::ReturnTypeExpr()

Definition at line 216 of Concept.hpp :
216 { return returnTypeExpr.get(); }

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


ToString Member Function

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

Definition at line 523 of Concept.cpp
Declaration at line 221 of Concept.hpp

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

Calls: sngcm::ast::MemberFunctionConstraintNode::ToString , sngcm::ast::Node::ToString , sngcm::ast::NodeList::Count , sngcm::ast::ParameterNode::TypeExpr

Called by: sngcm::ast::MemberFunctionConstraintNode::ToString


TypeParamId Member Function

const IdentifierNode * sngcm::ast::MemberFunctionConstraintNode::TypeParamId() const

Definition at line 217 of Concept.hpp :
217 { return typeParamId.get(); }


TypeParamId Member Function

IdentifierNode * sngcm::ast::MemberFunctionConstraintNode::TypeParamId()

Definition at line 218 of Concept.hpp :
218 { return typeParamId.get(); }

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


Write Member Function

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

Definition at line 496 of Concept.cpp :
 497 {
 498     SignatureConstraintNode::Write(writer);
 499     writer.Write(returnTypeExpr.get());
 500     writer.Write(typeParamId.get());
 501     writer.GetBinaryWriter().Write(groupId);
 502     parameters.Write(writer);
 503 }


Declaration at line 212 of Concept.hpp

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

Calls: sngcm::ast::AstWriter::GetBinaryWriter , sngcm::ast::Node::Write , sngcm::ast::NodeList::Write , soulng::util::BinaryWriter::Write


top | up | prev | next