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

Detailed Description

Definition at line 214 of file ParserNode.h.

Constructor & Destructor Documentation

Parser::DoubleLiteral::DoubleLiteral ( double  d)

Definition at line 216 of file ParserNode.h.

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

Implements Parser::Literal.

Definition at line 207 of file ParserNode.cpp.

References Datum::doubleval, and kDOUBLE.

210  {
211  Datum d;
212  d.doubleval = doubleval_;
213  return makeExpr<Analyzer::Constant>(kDOUBLE, false, d);
214 }
Definition: Datum.h:67
double doubleval
Definition: Datum.h:74
double Parser::DoubleLiteral::get_doubleval ( ) const

Definition at line 217 of file ParserNode.h.

References doubleval_.

217 { return doubleval_; }
std::string Parser::DoubleLiteral::to_string ( ) const

Implements Parser::Literal.

Definition at line 222 of file ParserNode.h.

References doubleval_.

222  {
223  return boost::lexical_cast<std::string>(doubleval_);
224  }

Member Data Documentation

double Parser::DoubleLiteral::doubleval_

Definition at line 227 of file ParserNode.h.

Referenced by get_doubleval(), and to_string().

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