top | up | prev | next

SByteLiteralNode Class

Definition at line 45 of Literal.hpp

Constructors

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

Member Variables

int8_t value

Constructor Details

SByteLiteralNode Constructor

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

Definition at line 153 of Literal.cpp :
153 :
154 LiteralNode(NodeType::sbyteLiteralNodespan_moduleId_)value(0)
155 {
156 }


Declaration at line 48 of Literal.hpp


SByteLiteralNode Constructor

sngcm::ast::SByteLiteralNode::SByteLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, int8_t value_)

Definition at line 158 of Literal.cpp :
158 :
159 LiteralNode(NodeType::sbyteLiteralNodespan_moduleId_)value(value_)
160 {
161 }


Declaration at line 49 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 169 of Literal.cpp :
170 {
171     visitor.Visit(*this);
172 }


Declaration at line 51 of Literal.hpp

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

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


Clone Member Function

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

Definition at line 163 of Literal.cpp :
164 {
165     SByteLiteralNode* clone = new SByteLiteralNode(GetSpan()ModuleId()value);
166     return clone;
167 }


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

Definition at line 180 of Literal.cpp :
181 {
182     LiteralNode::Read(reader);
183     value = reader.GetBinaryReader().ReadSByte();
184 }


Declaration at line 53 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::ReadSByte


ToString Member Function

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

Definition at line 186 of Literal.cpp :
187 {
188     return std::to_string(value);
189 }


Declaration at line 54 of Literal.hpp

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


Value Member Function

int8_t sngcm::ast::SByteLiteralNode::Value() const

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

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


Write Member Function

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

Definition at line 174 of Literal.cpp :
175 {
176     LiteralNode::Write(writer);
177     writer.GetBinaryWriter().Write(value);
178 }


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