OmniSciDB  c07336695a
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 196 of file ParserNode.h.

Constructor & Destructor Documentation

◆ FloatLiteral()

Parser::FloatLiteral::FloatLiteral ( float  f)

Definition at line 198 of file ParserNode.h.

198 : 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

Implements Parser::Literal.

Definition at line 144 of file ParserNode.cpp.

References anonymous_namespace{ImportTest.cpp}::d(), Datum::floatval, and kFLOAT.

147  {
148  Datum d;
149  d.floatval = floatval;
150  return makeExpr<Analyzer::Constant>(kFLOAT, false, d);
151 }
void d(const SQLTypes expected_type, const std::string &str)
Definition: ImportTest.cpp:268
float floatval
Definition: sqltypes.h:127
+ Here is the call graph for this function:

◆ get_floatval()

float Parser::FloatLiteral::get_floatval ( ) const

Definition at line 199 of file ParserNode.h.

References anonymous_namespace{UpdateMetadataTest.cpp}::query.

199 { return floatval; }

◆ to_string()

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

Implements Parser::Literal.

Definition at line 204 of file ParserNode.h.

204  {
205  return boost::lexical_cast<std::string>(floatval);
206  }

Member Data Documentation

◆ floatval

float Parser::FloatLiteral::floatval

Definition at line 209 of file ParserNode.h.

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