OmniSciDB  c1a53651b2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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

Detailed Description

Definition at line 194 of file ParserNode.h.

Constructor & Destructor Documentation

Parser::FloatLiteral::FloatLiteral ( float  f)

Definition at line 196 of file ParserNode.h.

196 : floatval_(f) {}
constexpr double f
Definition: Utm.h:31

Member Function Documentation

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

Implements Parser::Literal.

Definition at line 198 of file ParserNode.cpp.

References Datum::floatval, and kFLOAT.

201  {
202  Datum d;
203  d.floatval = floatval_;
204  return makeExpr<Analyzer::Constant>(kFLOAT, false, d);
205 }
float floatval
Definition: Datum.h:73
Definition: Datum.h:67
float Parser::FloatLiteral::get_floatval ( ) const

Definition at line 197 of file ParserNode.h.

References floatval_.

197 { return floatval_; }
std::string Parser::FloatLiteral::to_string ( ) const

Implements Parser::Literal.

Definition at line 202 of file ParserNode.h.

References floatval_.

202  {
203  return boost::lexical_cast<std::string>(floatval_);
204  }

Member Data Documentation

float Parser::FloatLiteral::floatval_

Definition at line 207 of file ParserNode.h.

Referenced by get_floatval(), and to_string().

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