OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Parser::DoubleLiteral Class Reference

#include <ParserNode.h>

+ Inheritance diagram for Parser::DoubleLiteral:
+ Collaboration diagram for Parser::DoubleLiteral:

Public Member Functions

 DoubleLiteral (double d)
 
double get_doubleval () 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

double doubleval
 

Additional Inherited Members

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

Detailed Description

Definition at line 227 of file ParserNode.h.

Constructor & Destructor Documentation

Parser::DoubleLiteral::DoubleLiteral ( double  d)
inlineexplicit

Definition at line 229 of file ParserNode.h.

229 : doubleval(d) {}

Member Function Documentation

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

Implements Parser::Literal.

Definition at line 157 of file ParserNode.cpp.

References Datum::doubleval, and kDOUBLE.

160  {
161  Datum d;
162  d.doubleval = doubleval;
163  return makeExpr<Analyzer::Constant>(kDOUBLE, false, d);
164 }
double doubleval
Definition: sqltypes.h:131
double Parser::DoubleLiteral::get_doubleval ( ) const
inline

Definition at line 230 of file ParserNode.h.

References doubleval.

230 { return doubleval; }
std::string Parser::DoubleLiteral::to_string ( ) const
inlineoverridevirtual

Implements Parser::Literal.

Definition at line 235 of file ParserNode.h.

References doubleval.

235  {
236  return boost::lexical_cast<std::string>(doubleval);
237  }

Member Data Documentation

double Parser::DoubleLiteral::doubleval
private

Definition at line 240 of file ParserNode.h.

Referenced by get_doubleval(), and to_string().


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