top | up | prev | next

PointerNode Class

Definition at line 60 of TypeExpr.hpp

Constructors

PointerNode(const Span& span_)
PointerNode(const Span& span_, Node* subject_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
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> subject

Constructor Details

PointerNode Constructor

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

Definition at line 124 of TypeExpr.cpp :
124 : Node(NodeType::pointerNodespan_)
125 {
126 }


Declaration at line 63 of TypeExpr.hpp


PointerNode Constructor

sngcm::ast::PointerNode::PointerNode(const Span& span_, Node * subject_)

Definition at line 128 of TypeExpr.cpp :
128 : Node(NodeType::pointerNodespan_)subject(subject_)
129 {
130     subject->SetParent(this);
131 }


Declaration at line 64 of TypeExpr.hpp


Member Function Details

Accept Member Function

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

Definition at line 138 of TypeExpr.cpp :
139 {
140     visitor.Visit(*this);
141 }


Declaration at line 66 of TypeExpr.hpp

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

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


Clone Member Function

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

Definition at line 133 of TypeExpr.cpp :
134 {
135     return new PointerNode(GetSpan()subject->Clone(cloneContext));
136 }


Declaration at line 65 of TypeExpr.hpp

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

Calls: sngcm::ast::Node::GetSpan , sngcm::ast::PointerNode::Clone

Called by: sngcm::ast::PointerNode::Clone


Read Member Function

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

Definition at line 149 of TypeExpr.cpp :
150 {
151     Node::Read(reader);
152     subject.reset(reader.ReadNode());
153     subject->SetParent(this);
154 }


Declaration at line 68 of TypeExpr.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::PointerNode::Subject() const

Definition at line 70 of TypeExpr.hpp :
70 { return subject.get(); }


Subject Member Function

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

Definition at line 71 of TypeExpr.hpp :
71 { return subject.get(); }

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


ToString Member Function

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

Definition at line 156 of TypeExpr.cpp :
157 {
158     return subject->ToString() + "*";
159 }


Declaration at line 69 of TypeExpr.hpp

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

Calls: sngcm::ast::PointerNode::ToString

Called by: sngcm::ast::PointerNode::ToString


Write Member Function

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

Definition at line 143 of TypeExpr.cpp :
144 {
145     Node::Write(writer);
146     writer.Write(subject.get());
147 }


Declaration at line 67 of TypeExpr.hpp

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

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


top | up | prev | next