top | up | prev | next

IndexingNode Class

Definition at line 363 of Expression.hpp

Constructors

IndexingNode(const Span& span_, const boost::uuids::uuid& moduleId_)
IndexingNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node* subject_, Node* index_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
const Node* Index() const
Node* Index()
void Read(AstReader& reader) override
const Node* Subject() const
Node* Subject()
std::string ToString() const override
void Write(AstWriter& writer) override

Member Variables

std::unique_ptr<Node> index
std::unique_ptr<Node> subject

Constructor Details

IndexingNode Constructor

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

Definition at line 863 of Expression.cpp :
 863 : Node(NodeType::indexingNodespan_moduleId_)subject()index()
 864 {
 865 }


Declaration at line 366 of Expression.hpp


IndexingNode Constructor

sngcm::ast::IndexingNode::IndexingNode(const Span& span_, const boost::uuids::uuid& moduleId_, Node * subject_, Node * index_)

Definition at line 867 of Expression.cpp :
 867 :
 868 Node(NodeType::indexingNodespan_moduleId_)subject(subject_)index(index_)
 869 {
 870     subject->SetParent(this);
 871     index->SetParent(this);
 872 }


Declaration at line 367 of Expression.hpp


Member Function Details

Accept Member Function

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

Definition at line 880 of Expression.cpp :
 881 {
 882     visitor.Visit(*this);
 883 }


Declaration at line 369 of Expression.hpp

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

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


Clone Member Function

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

Definition at line 874 of Expression.cpp :
 875 {
 876     IndexingNode* clone = new IndexingNode(GetSpan()ModuleId()subject->Clone(cloneContext)index->Clone(cloneContext));
 877     return clone;
 878 }


Declaration at line 368 of Expression.hpp

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

Calls: sngcm::ast::IndexingNode::Clone , sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId

Called by: sngcm::ast::IndexingNode::Clone


Index Member Function

const Node * sngcm::ast::IndexingNode::Index() const

Definition at line 374 of Expression.hpp :
374 { return index.get(); }


Index Member Function

Node * sngcm::ast::IndexingNode::Index()

Definition at line 375 of Expression.hpp :
375 { return index.get(); }

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


Read Member Function

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

Definition at line 892 of Expression.cpp :
 893 {
 894     Node::Read(reader);
 895     subject.reset(reader.ReadNode());
 896     subject->SetParent(this);
 897     index.reset(reader.ReadNode());
 898     index->SetParent(this);
 899 }


Declaration at line 371 of Expression.hpp

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

Calls: sngcm::ast::AstReader::ReadNode , sngcm::ast::Node::Read , sngcm::ast::Node::SetParent


Subject Member Function

const Node * sngcm::ast::IndexingNode::Subject() const

Definition at line 372 of Expression.hpp :
372 { return subject.get(); }


Subject Member Function

Node * sngcm::ast::IndexingNode::Subject()

Definition at line 373 of Expression.hpp :
373 { return subject.get(); }

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


ToString Member Function

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

Definition at line 901 of Expression.cpp :
 902 {
 903     return subject->ToString() + "[" + index->ToString() + "]";
 904 }


Declaration at line 376 of Expression.hpp

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

Calls: sngcm::ast::IndexingNode::ToString

Called by: sngcm::ast::IndexingNode::ToString


Write Member Function

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

Definition at line 885 of Expression.cpp :
 886 {
 887     Node::Write(writer);
 888     writer.Write(subject.get());
 889     writer.Write(index.get());
 890 }


Declaration at line 370 of Expression.hpp

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

Calls: sngcm::ast::Node::Write


top | up | prev | next