top | up | prev | next

ConstructorConstraintNode Class

Definition at line 171 of Concept.hpp

Constructors

ConstructorConstraintNode(const Span& span_)
ConstructorConstraintNode(const Span& span_, IdentifierNode* typeParamId_)

Member Functions

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

Member Variables

NodeList<ParameterNode> parameters
std::unique_ptr<IdentifierNode> typeParamId

Constructor Details

ConstructorConstraintNode Constructor

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

Definition at line 363 of Concept.cpp :
 363 : SignatureConstraintNode(NodeType::constructorConstraintNodespan_)typeParamId()parameters()
 364 {
 365 }


Declaration at line 174 of Concept.hpp


ConstructorConstraintNode Constructor

sngcm::ast::ConstructorConstraintNode::ConstructorConstraintNode(const Span& span_, IdentifierNode * typeParamId_)

Definition at line 367 of Concept.cpp :
 367 :
 368 SignatureConstraintNode(NodeType::constructorConstraintNodespan_)typeParamId(typeParamId_)parameters()
 369 {
 370     typeParamId->SetParent(this);
 371 }


Declaration at line 175 of Concept.hpp


Member Function Details

Accept Member Function

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

Definition at line 384 of Concept.cpp :
 385 {
 386     visitor.Visit(*this);
 387 }


Declaration at line 177 of Concept.hpp

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

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


AddParameter Member Function

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

Definition at line 423 of Concept.cpp :
 424 {
 425     parameter->SetParent(this);
 426     parameters.Add(parameter);
 427 }


Declaration at line 180 of Concept.hpp

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

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

Called by: sngcm::ast::ConstructorConstraintNode::Clone


Clone Member Function

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

Definition at line 373 of Concept.cpp :
 374 {
 375     ConstructorConstraintNode* clone = new ConstructorConstraintNode(GetSpan()static_cast<IdentifierNode*>(typeParamId->Clone(cloneContext)));
 376     int n = parameters.Count();
 377     for (int i = 0; i < n; ++i)
 378     {
 379         clone->AddParameter(static_cast<ParameterNode*>(parameters[i]->Clone(cloneContext)));
 380     }
 381     return clone;
 382 }


Declaration at line 176 of Concept.hpp

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

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

Called by: sngcm::ast::ConstructorConstraintNode::Clone


Parameters Member Function

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

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

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


Read Member Function

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

Definition at line 396 of Concept.cpp :
 397 {
 398     SignatureConstraintNode::Read(reader);
 399     typeParamId.reset(static_cast<IdentifierNode*>(reader.ReadNode()));
 400     typeParamId->SetParent(this);
 401     parameters.Read(reader);
 402     parameters.SetParent(this);
 403 }


Declaration at line 179 of Concept.hpp

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

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::Read , sngcm::ast::Node::SetParent , sngcm::ast::NodeList::Read , sngcm::ast::NodeList::SetParent


ToString Member Function

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

Definition at line 405 of Concept.cpp
Declaration at line 184 of Concept.hpp

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

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

Called by: sngcm::ast::ConstructorConstraintNode::ToString


TypeParamId Member Function

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

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


TypeParamId Member Function

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

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

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


Write Member Function

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

Definition at line 389 of Concept.cpp :
 390 {
 391     SignatureConstraintNode::Write(writer);
 392     writer.Write(typeParamId.get());
 393     parameters.Write(writer);
 394 }


Declaration at line 178 of Concept.hpp

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

Calls: sngcm::ast::Node::Write , sngcm::ast::NodeList::Write


top | up | prev | next