top | up | prev | next

ConceptIdNode Class

Definition at line 295 of Concept.hpp

Constructors

ConceptIdNode(const Span& span_)
ConceptIdNode(const Span& span_, IdentifierNode* id_)

Member Functions

void Accept(Visitor& visitor) override
void AddTypeParameter(Node* typeParameter)
int Arity() const
Node* Clone(CloneContext& cloneContext) const override
const IdentifierNode* Id() const
IdentifierNode* Id()
void Read(AstReader& reader) override
std::string ToString() const override
const NodeList<Node>& TypeParameters() const
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<IdentifierNode> id
NodeList<Node> typeParameters

Constructor Details

ConceptIdNode Constructor

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

Definition at line 726 of Concept.cpp :
 726 : Node(NodeType::conceptIdNodespan_)id()typeParameters()
 727 {
 728 }


Declaration at line 298 of Concept.hpp


ConceptIdNode Constructor

sngcm::ast::ConceptIdNode::ConceptIdNode(const Span& span_, IdentifierNode * id_)

Definition at line 730 of Concept.cpp :
 730 : Node(NodeType::conceptIdNodespan_)id(id_)typeParameters()
 731 {
 732     id->SetParent(this);
 733 }


Declaration at line 299 of Concept.hpp


Member Function Details

Accept Member Function

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

Definition at line 746 of Concept.cpp :
 747 {
 748     visitor.Visit(*this);
 749 }


Declaration at line 301 of Concept.hpp

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

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

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


AddTypeParameter Member Function

void sngcm::ast::ConceptIdNode::AddTypeParameter(Node * typeParameter)

Definition at line 767 of Concept.cpp :
 768 {
 769     typeParameter->SetParent(this);
 770     typeParameters.Add(typeParameter);
 771 }


Declaration at line 307 of Concept.hpp

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

Called by: sngcm::ast::ConceptIdNode::Clone


Arity Member Function

int sngcm::ast::ConceptIdNode::Arity() const

Definition at line 308 of Concept.hpp :
308 { return typeParameters.Count(); }

Calls: sngcm::ast::NodeList::Count


Clone Member Function

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

Definition at line 735 of Concept.cpp :
 736 {
 737     ConceptIdNode* clone = new ConceptIdNode(GetSpan()static_cast<IdentifierNode*>(id->Clone(cloneContext)));
 738     int n = typeParameters.Count();
 739     for (int i = 0; i < n; ++i)
 740     {
 741         clone->AddTypeParameter(typeParameters[i]->Clone(cloneContext));
 742     }
 743     return clone;
 744 }


Declaration at line 300 of Concept.hpp

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

Calls: sngcm::ast::ConceptIdNode::AddTypeParameter , sngcm::ast::ConceptIdNode::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::NodeList::Count

Called by: sngcm::ast::ConceptIdNode::Clone


Id Member Function

const IdentifierNode * sngcm::ast::ConceptIdNode::Id() const

Definition at line 304 of Concept.hpp :
304 { return id.get(); }


Id Member Function

IdentifierNode * sngcm::ast::ConceptIdNode::Id()

Definition at line 305 of Concept.hpp :
305 { return id.get(); }

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


Read Member Function

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

Definition at line 758 of Concept.cpp :
 759 {
 760     Node::Read(reader);
 761     id.reset(reader.ReadIdentifierNode());
 762     id->SetParent(this);
 763     typeParameters.Read(reader);
 764     typeParameters.SetParent(this);
 765 }


Declaration at line 303 of Concept.hpp

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

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


ToString Member Function

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

Definition at line 773 of Concept.cpp
Declaration at line 309 of Concept.hpp

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

Calls: sngcm::ast::ConceptIdNode::ToString , sngcm::ast::NodeList::Count

Called by: sngcm::ast::ConceptIdNode::ToString


TypeParameters Member Function

const NodeList <Node >& sngcm::ast::ConceptIdNode::TypeParameters() const

Definition at line 306 of Concept.hpp :
306 { return typeParameters; }

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


Write Member Function

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

Definition at line 751 of Concept.cpp :
 752 {
 753     Node::Write(writer);
 754     writer.Write(id.get());
 755     typeParameters.Write(writer);
 756 }


Declaration at line 302 of Concept.hpp

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

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


top | up | prev | next