OmniSciDB  dfae7c3b14
Parser::FloatLiteral Class Reference

#include <ParserNode.h>

+ Inheritance diagram for Parser::FloatLiteral:
+ Collaboration diagram for Parser::FloatLiteral:

Public Member Functions

 FloatLiteral (float f)
 
float get_floatval () const
 
std::shared_ptr< Analyzer::Expranalyze (const Catalog_Namespace::Catalog &catalog, Analyzer::Query &query, TlistRefType allow_tlist_ref=TLIST_NONE) const override
 
std::string to_string () const override
 
- Public Member Functions inherited from Parser::Node
virtual ~Node ()
 

Private Attributes

float floatval
 

Additional Inherited Members

- Public Types inherited from Parser::Expr
enum  TlistRefType { TLIST_NONE, TLIST_REF, TLIST_COPY }
 

Detailed Description

Definition at line 190 of file ParserNode.h.

Constructor & Destructor Documentation

◆ FloatLiteral()

Parser::FloatLiteral::FloatLiteral ( float  f)
inlineexplicit

Definition at line 192 of file ParserNode.h.

192 : floatval(f) {}

Member Function Documentation

◆ analyze()

std::shared_ptr< Analyzer::Expr > Parser::FloatLiteral::analyze ( const Catalog_Namespace::Catalog catalog,
Analyzer::Query query,
TlistRefType  allow_tlist_ref = TLIST_NONE 
) const
overridevirtual

Implements Parser::Literal.

Definition at line 151 of file ParserNode.cpp.

References Datum::floatval, and kFLOAT.

154  {
155  Datum d;
156  d.floatval = floatval;
157  return makeExpr<Analyzer::Constant>(kFLOAT, false, d);
158 }
float floatval
Definition: sqltypes.h:139

◆ get_floatval()

float Parser::FloatLiteral::get_floatval ( ) const
inline

Definition at line 193 of file ParserNode.h.

193 { return floatval; }

◆ to_string()

std::string Parser::FloatLiteral::to_string ( ) const
inlineoverridevirtual

Implements Parser::Literal.

Definition at line 198 of file ParserNode.h.

198  {
199  return boost::lexical_cast<std::string>(floatval);
200  }

Member Data Documentation

◆ floatval

float Parser::FloatLiteral::floatval
private

Definition at line 203 of file ParserNode.h.


The documentation for this class was generated from the following files: