top | up | prev | next

ConstructorConstraintNode Class

Definition at line 171 of Concept.hpp

Constructors

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

Definition at line 380 of Concept.cpp :
 380 :
 381 SignatureConstraintNode(NodeType::constructorConstraintNodespan_moduleId_)typeParamId()parameters()
 382 {
 383 }


Declaration at line 174 of Concept.hpp


ConstructorConstraintNode Constructor

sngcm::ast::ConstructorConstraintNode::ConstructorConstraintNode(const Span& span_, const boost::uuids::uuid& moduleId_, IdentifierNode * typeParamId_)

Definition at line 385 of Concept.cpp :
 385 :
 386 SignatureConstraintNode(NodeType::constructorConstraintNodespan_moduleId_)typeParamId(typeParamId_)parameters()
 387 {
 388     typeParamId->SetParent(this);
 389 }


Declaration at line 175 of Concept.hpp


Member Function Details

Accept Member Function

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

Definition at line 402 of Concept.cpp :
 403 {
 404     visitor.Visit(*this);
 405 }


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 441 of Concept.cpp :
 442 {
 443     parameter->SetParent(this);
 444     parameters.Add(parameter);
 445 }


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 391 of Concept.cpp :
 392 {
 393     ConstructorConstraintNode* clone = new ConstructorConstraintNode(GetSpan()ModuleId()static_cast<IdentifierNode*>(typeParamId->Clone(cloneContext)));
 394     int n = parameters.Count();
 395     for (int i = 0; i < n; ++i)
 396     {
 397         clone->AddParameter(static_cast<ParameterNode*>(parameters[i]->Clone(cloneContext)));
 398     }
 399     return clone;
 400 }


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::Node::ModuleId , 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 414 of Concept.cpp :
 415 {
 416     SignatureConstraintNode::Read(reader);
 417     typeParamId.reset(static_cast<IdentifierNode*>(reader.ReadNode()));
 418     typeParamId->SetParent(this);
 419     parameters.Read(reader);
 420     parameters.SetParent(this);
 421 }


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 423 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 407 of Concept.cpp :
 408 {
 409     SignatureConstraintNode::Write(writer);
 410     writer.Write(typeParamId.get());
 411     parameters.Write(writer);
 412 }


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