OmniSciDB  95562058bd
 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

Detailed Description

Definition at line 210 of file ParserNode.h.

Constructor & Destructor Documentation

Parser::DoubleLiteral::DoubleLiteral ( double  d)

Definition at line 212 of file ParserNode.h.

212 : 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 160 of file ParserNode.cpp.

References Datum::doubleval, and kDOUBLE.

163  {
164  Datum d;
165  d.doubleval = doubleval;
166  return makeExpr<Analyzer::Constant>(kDOUBLE, false, d);
167 }
double doubleval
Definition: sqltypes.h:140
double Parser::DoubleLiteral::get_doubleval ( ) const

Definition at line 213 of file ParserNode.h.

References doubleval.

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

Implements Parser::Literal.

Definition at line 218 of file ParserNode.h.

References doubleval.

218  {
219  return boost::lexical_cast<std::string>(doubleval);
220  }

Member Data Documentation

double Parser::DoubleLiteral::doubleval

Definition at line 223 of file ParserNode.h.

Referenced by get_doubleval(), and to_string().

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