top | up | prev | next

DotNode Class

Definition at line 13 of Expression.hpp

Constructors

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

DotNode Constructor

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

Definition at line 12 of Expression.cpp :
  12 : UnaryNode(NodeType::dotNodespan_moduleId_)memberId()
  13 {
  14 }


Declaration at line 16 of Expression.hpp


DotNode Constructor

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

Definition at line 16 of Expression.cpp :
  16 : UnaryNode(NodeType::dotNodespan_moduleId_subject_)memberId(memberId_)
  17 {
  18     memberId->SetParent(this);
  19 }


Declaration at line 17 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 27 of Expression.cpp :
  28 {
  29     visitor.Visit(*this);
  30 }


Declaration at line 19 of Expression.hpp

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

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


Clone Member Function

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

Definition at line 21 of Expression.cpp :
  22 {
  23     DotNode* clone = new DotNode(GetSpan()ModuleId()Subject()->Clone(cloneContext)static_cast<IdentifierNode*>(memberId->Clone(cloneContext)));
  24     return clone;
  25 }


Declaration at line 18 of Expression.hpp

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

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

Called by: sngcm::ast::DotNode::Clone


MemberId Member Function

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

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


MemberId Member Function

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

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

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


Read Member Function

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

Definition at line 38 of Expression.cpp :
  39 {
  40     UnaryNode::Read(reader);
  41     memberId.reset(reader.ReadIdentifierNode());
  42     memberId->SetParent(this);
  43 }


Declaration at line 21 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::DotNode::ToString() const override

Definition at line 45 of Expression.cpp :
  46 {
  47     return Subject()->ToString() + "." + memberId->ToString();
  48 }


Declaration at line 22 of Expression.hpp

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

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

Called by: sngcm::ast::DotNode::ToString


Write Member Function

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

Definition at line 32 of Expression.cpp :
  33 {
  34     UnaryNode::Write(writer);
  35     writer.Write(memberId.get());
  36 }


Declaration at line 20 of Expression.hpp

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

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


top | up | prev | next