top | up | prev | next

FunctionConstraintNode Class

Definition at line 229 of Concept.hpp

Constructors

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

Definition at line 568 of Concept.cpp :
 568 :
 569 SignatureConstraintNode(NodeType::functionConstraintNodespan_moduleId_)returnTypeExpr()groupId()parameters()
 570 {
 571 }


Declaration at line 232 of Concept.hpp


FunctionConstraintNode Constructor

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

Definition at line 573 of Concept.cpp :
 574 : SignatureConstraintNode(NodeType::functionConstraintNodespan_moduleId_)returnTypeExpr(returnTypeExpr_)groupId(groupId_)parameters()
 575 {
 576     returnTypeExpr->SetParent(this);
 577 }


Declaration at line 233 of Concept.hpp


Member Function Details

Accept Member Function

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

Definition at line 590 of Concept.cpp :
 591 {
 592     visitor.Visit(*this);
 593 }


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 613 of Concept.cpp :
 614 {
 615     parameter->SetParent(this);
 616     parameters.Add(parameter);
 617 }


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 579 of Concept.cpp :
 580 {
 581     FunctionConstraintNode* clone = new FunctionConstraintNode(GetSpan()ModuleId()returnTypeExpr->Clone(cloneContext)groupId);
 582     int n = parameters.Count();
 583     for (int i = 0; i < n; ++i)
 584     {
 585         clone->AddParameter(static_cast<ParameterNode*>(parameters[i]->Clone(cloneContext)));
 586     }
 587     return clone;
 588 }


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::Node::ModuleId , 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 603 of Concept.cpp :
 604 {
 605     SignatureConstraintNode::Read(reader);
 606     returnTypeExpr.reset(reader.ReadNode());
 607     returnTypeExpr->SetParent(this);
 608     groupId = reader.GetBinaryReader().ReadUtf32String();
 609     parameters.Read(reader);
 610     parameters.SetParent(this);
 611 }


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 619 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 595 of Concept.cpp :
 596 {
 597     SignatureConstraintNode::Write(writer);
 598     writer.Write(returnTypeExpr.get());
 599     writer.GetBinaryWriter().Write(groupId);
 600     parameters.Write(writer);
 601 }


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