top | up | prev | next

MemberInitializerNode Class

Definition at line 86 of Class.hpp

Constructors

MemberInitializerNode(const Span& span_)
MemberInitializerNode(const Span& span_, IdentifierNode* memberId_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
const IdentifierNode* MemberId() const
IdentifierNode* MemberId()
void Read(AstReader& reader) override
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<IdentifierNode> memberId

Constructor Details

MemberInitializerNode Constructor

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

Definition at line 273 of Class.cpp :
273 : InitializerNode(NodeType::memberInitializerNodespan_)memberId()
274 {
275 }


Declaration at line 89 of Class.hpp


MemberInitializerNode Constructor

sngcm::ast::MemberInitializerNode::MemberInitializerNode(const Span& span_, IdentifierNode * memberId_)

Definition at line 277 of Class.cpp :
277 : InitializerNode(NodeType::memberInitializerNodespan_)memberId(memberId_)
278 {
279     memberId->SetParent(this);
280 }


Declaration at line 90 of Class.hpp


Member Function Details

Accept Member Function

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

Definition at line 293 of Class.cpp :
294 {
295     visitor.Visit(*this);
296 }


Declaration at line 92 of Class.hpp

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

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


Clone Member Function

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

Definition at line 282 of Class.cpp :
283 {
284     MemberInitializerNode* clone = new MemberInitializerNode(GetSpan()static_cast<IdentifierNode*>(memberId->Clone(cloneContext)));
285     int n = Arguments().Count();
286     for (int i = 0; i < n; ++i)
287     {
288         clone->AddArgument(Arguments()[i]->Clone(cloneContext));
289     }
290     return clone;
291 }


Declaration at line 91 of Class.hpp

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

Calls: sngcm::ast::InitializerNode::AddArgument , sngcm::ast::InitializerNode::Arguments , sngcm::ast::MemberInitializerNode::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::NodeList::Count

Called by: sngcm::ast::MemberInitializerNode::Clone


MemberId Member Function

const IdentifierNode * sngcm::ast::MemberInitializerNode::MemberId() const

Definition at line 95 of Class.hpp :
 95 { return memberId.get(); }


MemberId Member Function

IdentifierNode * sngcm::ast::MemberInitializerNode::MemberId()

Definition at line 96 of Class.hpp :
 96 { return memberId.get(); }

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


Read Member Function

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

Definition at line 304 of Class.cpp :
305 {
306     InitializerNode::Read(reader);
307     memberId.reset(reader.ReadIdentifierNode());
308     memberId->SetParent(this);
309 }


Declaration at line 94 of Class.hpp

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

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


Write Member Function

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

Definition at line 298 of Class.cpp :
299 {
300     InitializerNode::Write(writer);
301     writer.Write(memberId.get());
302 }


Declaration at line 93 of Class.hpp

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

Calls: sngcm::ast::InitializerNode::Write


top | up | prev | next