top | up | prev | next

ArrowNode Class

Definition at line 29 of Expression.hpp

Constructors

ArrowNode(const Span& span_, const boost::uuids::uuid& moduleId_)
ArrowNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node* subject_, 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
std::string ToString() const override
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<IdentifierNode> memberId

Constructor Details

ArrowNode Constructor

sngcm::ast::ArrowNode::ArrowNode(const Span& span_, const boost::uuids::uuid& moduleId_)

Definition at line 50 of Expression.cpp :
  50 : UnaryNode(NodeType::arrowNodespan_moduleId_)memberId()
  51 {
  52 }


Declaration at line 32 of Expression.hpp


ArrowNode Constructor

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

Definition at line 54 of Expression.cpp :
  54 :
  55 UnaryNode(NodeType::arrowNodespan_moduleId_subject_)memberId(memberId_)
  56 {
  57     memberId->SetParent(this);
  58 }


Declaration at line 33 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 66 of Expression.cpp :
  67 {
  68     visitor.Visit(*this);
  69 }


Declaration at line 35 of Expression.hpp

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

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


Clone Member Function

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

Definition at line 60 of Expression.cpp :
  61 {
  62     ArrowNode* clone = new ArrowNode(GetSpan()ModuleId()Subject()->Clone(cloneContext)static_cast<IdentifierNode*>(memberId->Clone(cloneContext)));
  63     return clone;
  64 }


Declaration at line 34 of Expression.hpp

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

Calls: sngcm::ast::ArrowNode::Clone , sngcm::ast::Node::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId , sngcm::ast::UnaryNode::Subject

Called by: sngcm::ast::ArrowNode::Clone


MemberId Member Function

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

Definition at line 39 of Expression.hpp :
 39 { return memberId.get(); }


MemberId Member Function

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

Definition at line 40 of Expression.hpp :
 40 { return memberId.get(); }

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


Read Member Function

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

Definition at line 77 of Expression.cpp :
  78 {
  79     UnaryNode::Read(reader);
  80     memberId.reset(reader.ReadIdentifierNode());
  81     memberId->SetParent(this);
  82 }


Declaration at line 37 of Expression.hpp

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

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


ToString Member Function

std::string sngcm::ast::ArrowNode::ToString() const override

Definition at line 84 of Expression.cpp :
  85 {
  86     return Subject()->ToString() + "->" + memberId->ToString();
  87 }


Declaration at line 38 of Expression.hpp

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

Calls: sngcm::ast::ArrowNode::ToString , sngcm::ast::Node::ToString , sngcm::ast::UnaryNode::Subject

Called by: sngcm::ast::ArrowNode::ToString


Write Member Function

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

Definition at line 71 of Expression.cpp :
  72 {
  73     UnaryNode::Write(writer);
  74     writer.Write(memberId.get());
  75 }


Declaration at line 36 of Expression.hpp

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

Calls: sngcm::ast::UnaryNode::Write


top | up | prev | next