top | up | prev | next

ConstructorNode Class

Definition at line 119 of Class.hpp

Constructors

ConstructorNode(const Span& span_, const boost::uuids::uuid& moduleId_)
ConstructorNode(const Span& span_, const boost::uuids::uuid& moduleId_, Specifiers specifiers_, AttributesNode* 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_, const boost::uuids::uuid& moduleId_)

Definition at line 362 of Class.cpp :
362 : FunctionNode(NodeType::constructorNodespan_moduleId_Specifiers::nonenullptrU"@constructor"nullptr)initializers()
363 {
364 }


Declaration at line 122 of Class.hpp


ConstructorNode Constructor

sngcm::ast::ConstructorNode::ConstructorNode(const Span& span_, const boost::uuids::uuid& moduleId_, Specifiers specifiers_, AttributesNode * attributes_)

Definition at line 366 of Class.cpp :
366 : FunctionNode(NodeType::constructorNodespan_moduleId_specifiers_nullptrU"@constructor"attributes_)initializers()
367 {
368 }


Declaration at line 123 of Class.hpp


Member Function Details

Accept Member Function

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

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


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 403 of Class.cpp :
404 {
405     initializer->SetParent(this);
406     initializers.Add(initializer);
407 }


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 370 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::Node::ModuleId , 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 395 of Class.cpp :
396 {
397     FunctionNode::Read(reader);
398     initializers.Read(reader);
399     initializers.SetParent(this);
400     classId.reset(reader.ReadIdentifierNode());
401 }


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 388 of Class.cpp :
389 {
390     FunctionNode::Write(writer);
391     initializers.Write(writer);
392     writer.Write(classId.get());
393 }


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