top | up | prev | next

DoubleLiteralNode Class

Definition at line 180 of Literal.hpp

Constructors

DoubleLiteralNode(const Span& span_)
DoubleLiteralNode(const Span& span_, double value_)

Member Functions

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

Member Variables

double value

Constructor Details

DoubleLiteralNode Constructor

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

Definition at line 466 of Literal.cpp :
466 : LiteralNode(NodeType::doubleLiteralNodespan_)value(0)
467 {
468 }


Declaration at line 183 of Literal.hpp


DoubleLiteralNode Constructor

sngcm::ast::DoubleLiteralNode::DoubleLiteralNode(const Span& span_, double value_)

Definition at line 470 of Literal.cpp :
470 : LiteralNode(NodeType::doubleLiteralNodespan_)value(value_)
471 {
472 }


Declaration at line 184 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 479 of Literal.cpp :
480 {
481     visitor.Visit(*this);
482 }


Declaration at line 186 of Literal.hpp

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

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


Clone Member Function

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

Definition at line 474 of Literal.cpp :
475 {
476     return new DoubleLiteralNode(GetSpan()value);
477 }


Declaration at line 185 of Literal.hpp

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

Calls: sngcm::ast::Node::GetSpan


Read Member Function

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

Definition at line 490 of Literal.cpp :
491 {
492     LiteralNode::Read(reader);
493     value = reader.GetBinaryReader().ReadDouble();
494 }


Declaration at line 188 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::ReadDouble


ToString Member Function

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

Definition at line 496 of Literal.cpp :
497 {
498     return std::to_string(value);
499 }


Declaration at line 189 of Literal.hpp

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


Value Member Function

double sngcm::ast::DoubleLiteralNode::Value() const

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

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


Write Member Function

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

Definition at line 484 of Literal.cpp :
485 {
486     LiteralNode::Write(writer);
487     writer.GetBinaryWriter().Write(value);
488 }


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