top | up | prev | next

DoubleLiteralNode Class

Definition at line 181 of Literal.hpp

Constructors

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

Definition at line 493 of Literal.cpp :
493 :
494 LiteralNode(NodeType::doubleLiteralNodespan_moduleId_)value(0)
495 {
496 }


Declaration at line 184 of Literal.hpp


DoubleLiteralNode Constructor

sngcm::ast::DoubleLiteralNode::DoubleLiteralNode(const Span& span_, const boost::uuids::uuid& moduleId_, double value_)

Definition at line 498 of Literal.cpp :
498 :
499 LiteralNode(NodeType::doubleLiteralNodespan_moduleId_)value(value_)
500 {
501 }


Declaration at line 185 of Literal.hpp


Member Function Details

Accept Member Function

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

Definition at line 509 of Literal.cpp :
510 {
511     visitor.Visit(*this);
512 }


Declaration at line 187 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 503 of Literal.cpp :
504 {
505     DoubleLiteralNode* clone = new DoubleLiteralNode(GetSpan()ModuleId()value);
506     return clone;
507 }


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

Definition at line 520 of Literal.cpp :
521 {
522     LiteralNode::Read(reader);
523     value = reader.GetBinaryReader().ReadDouble();
524 }


Declaration at line 189 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 526 of Literal.cpp :
527 {
528     return std::to_string(value);
529 }


Declaration at line 190 of Literal.hpp

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


Value Member Function

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

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

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


Write Member Function

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

Definition at line 514 of Literal.cpp :
515 {
516     LiteralNode::Write(writer);
517     writer.GetBinaryWriter().Write(value);
518 }


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