top | up | prev | next

UShortLiteralNode Class

Definition at line 90 of Literal.hpp

Constructors

UShortLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_)
UShortLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, uint16_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
uint16_t Value() const
void Write(AstWriter& writer) override

Member Variables

uint16_t value

Constructor Details

UShortLiteralNode Constructor

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

Definition at line 267 of Literal.cpp :
267 : LiteralNode(NodeType::ushortLiteralNodespan_moduleId_)value(0u)
268 {
269 }


Declaration at line 93 of Literal.hpp


UShortLiteralNode Constructor

sngcm::ast::UShortLiteralNode::UShortLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, uint16_t value_)

Definition at line 271 of Literal.cpp :
271 :
272 LiteralNode(NodeType::ushortLiteralNodespan_moduleId_)value(value_)
273 {
274 }


Declaration at line 94 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 282 of Literal.cpp :
283 {
284     visitor.Visit(*this);
285 }


Declaration at line 96 of Literal.hpp

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

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


Clone Member Function

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

Definition at line 276 of Literal.cpp :
277 {
278     UShortLiteralNode* clone = new UShortLiteralNode(GetSpan()ModuleId()value);
279     return clone;
280 }


Declaration at line 95 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::UShortLiteralNode::Read(AstReader & reader) override

Definition at line 293 of Literal.cpp :
294 {
295     LiteralNode::Read(reader);
296     value = reader.GetBinaryReader().ReadUShort();
297 }


Declaration at line 98 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::ReadUShort


ToString Member Function

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

Definition at line 299 of Literal.cpp :
300 {
301     return std::to_string(value) + "u";
302 }


Declaration at line 99 of Literal.hpp

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


Value Member Function

uint16_t sngcm::ast::UShortLiteralNode::Value() const

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

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


Write Member Function

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

Definition at line 287 of Literal.cpp :
288 {
289     LiteralNode::Write(writer);
290     writer.GetBinaryWriter().Write(value);
291 }


Declaration at line 97 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