top | up | prev | next

ConstructorNode Class

Definition at line 119 of Class.hpp

Constructors

ConstructorNode(const Span& span_)
ConstructorNode(const Span& span_, Specifiers specifiers_, Attributes* attributes_)

Member Functions

void Accept(Visitor& visitor) override
void AddInitializer(InitializerNode* initializer)
IdentifierNode* ClassId()
Node* Clone(CloneContext& cloneContext) const override
const NodeList<InitializerNode>& Initializers() const
void Read(AstReader& reader) override
void SetClassId(IdentifierNode* classId_)
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<IdentifierNode> classId
NodeList<InitializerNode> initializers

Constructor Details

ConstructorNode Constructor

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

Definition at line 359 of Class.cpp :
359 : FunctionNode(NodeType::constructorNodespan_Specifiers::nonenullptrU"@constructor"nullptr)initializers()
360 {
361 }


Declaration at line 122 of Class.hpp


ConstructorNode Constructor

sngcm::ast::ConstructorNode::ConstructorNode(const Span& span_, Specifiers specifiers_, Attributes * attributes_)

Definition at line 363 of Class.cpp :
363 : FunctionNode(NodeType::constructorNodespan_specifiers_nullptrU"@constructor"attributes_)initializers()
364 {
365 }


Declaration at line 123 of Class.hpp


Member Function Details

Accept Member Function

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

Definition at line 380 of Class.cpp :
381 {
382     visitor.Visit(*this);
383 }


Declaration at line 125 of Class.hpp

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

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


AddInitializer Member Function

void sngcm::ast::ConstructorNode::AddInitializer(InitializerNode * initializer)

Definition at line 400 of Class.cpp :
401 {
402     initializer->SetParent(this);
403     initializers.Add(initializer);
404 }


Declaration at line 128 of Class.hpp

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

Called by: sngcm::ast::ConstructorNode::Clone


ClassId Member Function

IdentifierNode * sngcm::ast::ConstructorNode::ClassId()

Definition at line 131 of Class.hpp :
131 { return classId.get(); }

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


Clone Member Function

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

Definition at line 367 of Class.cpp
Declaration at line 124 of Class.hpp

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

Calls: sngcm::ast::ConstructorNode::AddInitializer , sngcm::ast::ConstructorNode::Clone , sngcm::ast::FunctionNode::CloneContent , sngcm::ast::FunctionNode::GetSpecifiers , sngcm::ast::Node::GetSpan , sngcm::ast::NodeList::Count

Called by: sngcm::ast::ConstructorNode::Clone


Initializers Member Function

const NodeList <InitializerNode >& sngcm::ast::ConstructorNode::Initializers() const

Definition at line 129 of Class.hpp :
129 { return initializers; }

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


Read Member Function

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

Definition at line 392 of Class.cpp :
393 {
394     FunctionNode::Read(reader);
395     initializers.Read(reader);
396     initializers.SetParent(this);
397     classId.reset(reader.ReadIdentifierNode());
398 }


Declaration at line 127 of Class.hpp

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

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


SetClassId Member Function

void sngcm::ast::ConstructorNode::SetClassId(IdentifierNode * classId_)

Definition at line 130 of Class.hpp :
130 { classId.reset(classId_); }


Write Member Function

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

Definition at line 385 of Class.cpp :
386 {
387     FunctionNode::Write(writer);
388     initializers.Write(writer);
389     writer.Write(classId.get());
390 }


Declaration at line 126 of Class.hpp

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

Calls: sngcm::ast::FunctionNode::Write , sngcm::ast::NodeList::Write


top | up | prev | next