top | up | prev | next

MemberInitializerNode Class

Definition at line 86 of Class.hpp

Constructors

MemberInitializerNode(const Span& span_, const boost::uuids::uuid& moduleId_)
MemberInitializerNode(const Span& span_, const boost::uuids::uuid& moduleId_, 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_, const boost::uuids::uuid& moduleId_)

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


Declaration at line 89 of Class.hpp


MemberInitializerNode Constructor

sngcm::ast::MemberInitializerNode::MemberInitializerNode(const Span& span_, const boost::uuids::uuid& moduleId_, IdentifierNode * memberId_)

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


Declaration at line 90 of Class.hpp


Member Function Details

Accept Member Function

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

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


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 284 of Class.cpp :
285 {
286     MemberInitializerNode* clone = new MemberInitializerNode(GetSpan()ModuleId()static_cast<IdentifierNode*>(memberId->Clone(cloneContext)));
287     int n = Arguments().Count();
288     for (int i = 0; i < n; ++i)
289     {
290         clone->AddArgument(Arguments()[i]->Clone(cloneContext));
291     }
292     return clone;
293 }


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::Node::ModuleId , 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 306 of Class.cpp :
307 {
308     InitializerNode::Read(reader);
309     memberId.reset(reader.ReadIdentifierNode());
310     memberId->SetParent(this);
311 }


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 300 of Class.cpp :
301 {
302     InitializerNode::Write(writer);
303     writer.Write(memberId.get());
304 }


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