top | up | prev | next

ShortLiteralNode Class

Definition at line 75 of Literal.hpp

Constructors

ShortLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_)
ShortLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, int16_t value_)

Member Functions

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

Member Variables

int16_t value

Constructor Details

ShortLiteralNode Constructor

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

Definition at line 229 of Literal.cpp :
229 :
230 LiteralNode(NodeType::shortLiteralNodespan_moduleId_)value(0)
231 {
232 }


Declaration at line 78 of Literal.hpp


ShortLiteralNode Constructor

sngcm::ast::ShortLiteralNode::ShortLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, int16_t value_)

Definition at line 234 of Literal.cpp :
234 :
235 LiteralNode(NodeType::shortLiteralNodespan_moduleId_)value(value_)
236 {
237 }


Declaration at line 79 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 245 of Literal.cpp :
246 {
247     visitor.Visit(*this);
248 }


Declaration at line 81 of Literal.hpp

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

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


Clone Member Function

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

Definition at line 239 of Literal.cpp :
240 {
241     ShortLiteralNode* clone = new ShortLiteralNode(GetSpan()ModuleId()value);
242     return clone;
243 }


Declaration at line 80 of Literal.hpp

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

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


Read Member Function

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

Definition at line 256 of Literal.cpp :
257 {
258     LiteralNode::Read(reader);
259     value = reader.GetBinaryReader().ReadShort();
260 }


Declaration at line 83 of Literal.hpp

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

Calls: sngcm::ast::AstReader::GetBinaryReader , sngcm::ast::LiteralNode::Read , soulng::util::BinaryReader::ReadShort


ToString Member Function

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

Definition at line 262 of Literal.cpp :
263 {
264     return std::to_string(value);
265 }


Declaration at line 84 of Literal.hpp

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


Value Member Function

int16_t sngcm::ast::ShortLiteralNode::Value() const

Definition at line 85 of Literal.hpp :
 85 { return value; }

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


Write Member Function

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

Definition at line 250 of Literal.cpp :
251 {
252     LiteralNode::Write(writer);
253     writer.GetBinaryWriter().Write(value);
254 }


Declaration at line 82 of Literal.hpp

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

Calls: sngcm::ast::AstWriter::GetBinaryWriter , sngcm::ast::LiteralNode::Write , soulng::util::BinaryWriter::Write


top | up | prev | next