top | up | prev | next

FunctionConstraintNode Class

Definition at line 229 of Concept.hpp

Constructors

FunctionConstraintNode(const Span& span_)
FunctionConstraintNode(const Span& span_, Node* returnTypeExpr_, 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
void Write(AstWriter& writer) override

Member Variables

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

Constructor Details

FunctionConstraintNode Constructor

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

Definition at line 547 of Concept.cpp :
 547 : SignatureConstraintNode(NodeType::functionConstraintNodespan_)returnTypeExpr()groupId()parameters()
 548 {
 549 }


Declaration at line 232 of Concept.hpp


FunctionConstraintNode Constructor

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

Definition at line 551 of Concept.cpp :
 552 : SignatureConstraintNode(NodeType::functionConstraintNodespan_)returnTypeExpr(returnTypeExpr_)groupId(groupId_)parameters()
 553 {
 554     returnTypeExpr->SetParent(this);
 555 }


Declaration at line 233 of Concept.hpp


Member Function Details

Accept Member Function

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

Definition at line 568 of Concept.cpp :
 569 {
 570     visitor.Visit(*this);
 571 }


Declaration at line 235 of Concept.hpp

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

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


AddParameter Member Function

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

Definition at line 591 of Concept.cpp :
 592 {
 593     parameter->SetParent(this);
 594     parameters.Add(parameter);
 595 }


Declaration at line 238 of Concept.hpp

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

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

Called by: sngcm::ast::FunctionConstraintNode::Clone


Clone Member Function

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

Definition at line 557 of Concept.cpp :
 558 {
 559     FunctionConstraintNode* clone = new FunctionConstraintNode(GetSpan()returnTypeExpr->Clone(cloneContext)groupId);
 560     int n = parameters.Count();
 561     for (int i = 0; i < n; ++i)
 562     {
 563         clone->AddParameter(static_cast<ParameterNode*>(parameters[i]->Clone(cloneContext)));
 564     }
 565     return clone;
 566 }


Declaration at line 234 of Concept.hpp

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

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

Called by: sngcm::ast::FunctionConstraintNode::Clone


GroupId Member Function

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

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

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


Parameters Member Function

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

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

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


Read Member Function

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

Definition at line 581 of Concept.cpp :
 582 {
 583     SignatureConstraintNode::Read(reader);
 584     returnTypeExpr.reset(reader.ReadNode());
 585     returnTypeExpr->SetParent(this);
 586     groupId = reader.GetBinaryReader().ReadUtf32String();
 587     parameters.Read(reader);
 588     parameters.SetParent(this);
 589 }


Declaration at line 237 of Concept.hpp

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

Calls: sngcm::ast::AstReader::GetBinaryReader , 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::FunctionConstraintNode::ReturnTypeExpr() const

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


ReturnTypeExpr Member Function

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

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

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


ToString Member Function

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

Definition at line 597 of Concept.cpp
Declaration at line 243 of Concept.hpp

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

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

Called by: sngcm::ast::FunctionConstraintNode::ToString


Write Member Function

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

Definition at line 573 of Concept.cpp :
 574 {
 575     SignatureConstraintNode::Write(writer);
 576     writer.Write(returnTypeExpr.get());
 577     writer.GetBinaryWriter().Write(groupId);
 578     parameters.Write(writer);
 579 }


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