top | up | prev | next

MemberInitializerNode Class

Definition at line 165 of Class.hpp

Constructors

MemberInitializerNode()
MemberInitializerNode(const Span& span_, Node* id_, Node* initializer_)

Member Functions

void Accept(Visitor& visitor) override
Node* Id()
Node* Initializer()
void Read(Reader& reader) override
void Write(Writer& writer) override

Member Variables

std::unique_ptr<Node> id
std::unique_ptr<Node> initializer

Constructor Details

MemberInitializerNode Constructor

sngcpp::ast::MemberInitializerNode::MemberInitializerNode()

Definition at line 338 of Class.cpp :
338 : Node(NodeType::memberInitializerNode)
339 {
340 }


Declaration at line 168 of Class.hpp


MemberInitializerNode Constructor

sngcpp::ast::MemberInitializerNode::MemberInitializerNode(const Span& span_, Node * id_, Node * initializer_)

Definition at line 342 of Class.cpp :
342 : Node(NodeType::memberInitializerNodespan_)id(id_)initializer(initializer_)
343 {
344 }


Declaration at line 169 of Class.hpp


Member Function Details

Accept Member Function

void sngcpp::ast::MemberInitializerNode::Accept(Visitor & visitor) override

Definition at line 346 of Class.cpp :
347 {
348     visitor.Visit(*this);
349 }


Declaration at line 170 of Class.hpp

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

Calls: sngcpp::ast::Visitor::Visit


Id Member Function

Node * sngcpp::ast::MemberInitializerNode::Id()

Definition at line 173 of Class.hpp :
173 { return id.get(); }


Initializer Member Function

Node * sngcpp::ast::MemberInitializerNode::Initializer()

Definition at line 174 of Class.hpp :
174 { return initializer.get(); }


Read Member Function

void sngcpp::ast::MemberInitializerNode::Read(Reader & reader) override

Definition at line 362 of Class.cpp :
363 {
364     Node::Read(reader);
365     id.reset(reader.ReadNode());
366     bool hasInitializer = reader.GetBinaryReader().ReadBool();
367     if (hasInitializer)
368     {
369         initializer.reset(reader.ReadNode());
370     }
371 }


Declaration at line 172 of Class.hpp

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

Calls: sngcpp::ast::Node::Read , sngcpp::ast::Reader::GetBinaryReader , sngcpp::ast::Reader::ReadNode


Write Member Function

void sngcpp::ast::MemberInitializerNode::Write(Writer & writer) override

Definition at line 351 of Class.cpp :
352 {
353     Node::Write(writer);
354     id->Write(writer);
355     writer.GetBinaryWriter().Write(initializer != nullptr);
356     if (initializer)
357     {
358         initializer->Write(writer);
359     }
360 }


Declaration at line 171 of Class.hpp

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

Calls: sngcpp::ast::MemberInitializerNode::Write , sngcpp::ast::Node::Write , sngcpp::ast::Writer::GetBinaryWriter

Called by: sngcpp::ast::MemberInitializerNode::Write


top | up | prev | next