top | up | prev | next

PointerNode Class

Definition at line 60 of TypeExpr.hpp

Constructors

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

Definition at line 129 of TypeExpr.cpp :
129 : Node(NodeType::pointerNodespan_moduleId_)
130 {
131 }


Declaration at line 63 of TypeExpr.hpp


PointerNode Constructor

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

Definition at line 133 of TypeExpr.cpp :
133 :
134 Node(NodeType::pointerNodespan_moduleId_)subject(subject_)
135 {
136     subject->SetParent(this);
137 }


Declaration at line 64 of TypeExpr.hpp


Member Function Details

Accept Member Function

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

Definition at line 145 of TypeExpr.cpp :
146 {
147     visitor.Visit(*this);
148 }


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 139 of TypeExpr.cpp :
140 {
141     PointerNode* clone = new PointerNode(GetSpan()ModuleId()subject->Clone(cloneContext));
142     return clone;
143 }


Declaration at line 65 of TypeExpr.hpp

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

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

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


Read Member Function

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

Definition at line 156 of TypeExpr.cpp :
157 {
158     Node::Read(reader);
159     subject.reset(reader.ReadNode());
160     subject->SetParent(this);
161 }


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 163 of TypeExpr.cpp :
164 {
165     return subject->ToString() + "*";
166 }


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 150 of TypeExpr.cpp :
151 {
152     Node::Write(writer);
153     writer.Write(subject.get());
154 }


Declaration at line 67 of TypeExpr.hpp

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

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


top | up | prev | next