OmniSciDB  c07336695a
Analyzer::TargetEntry Class Reference

#include <Analyzer.h>

+ Collaboration diagram for Analyzer::TargetEntry:

Public Member Functions

 TargetEntry (const std::string &n, std::shared_ptr< Analyzer::Expr > e, bool u)
 
virtual ~TargetEntry ()
 
const std::string & get_resname () const
 
void set_resname (const std::string &name)
 
Exprget_expr () const
 
std::shared_ptr< Exprget_own_expr () const
 
void set_expr (std::shared_ptr< Analyzer::Expr > e)
 
bool get_unnest () const
 
std::string toString () const
 
void print () const
 

Private Attributes

std::string resname
 
std::shared_ptr< Analyzer::Exprexpr
 
bool unnest
 

Detailed Description

Definition at line 1406 of file Analyzer.h.

Constructor & Destructor Documentation

◆ TargetEntry()

Analyzer::TargetEntry::TargetEntry ( const std::string &  n,
std::shared_ptr< Analyzer::Expr e,
bool  u 
)
inline

Definition at line 1408 of file Analyzer.h.

1409  : resname(n), expr(e), unnest(u) {}
std::shared_ptr< Analyzer::Expr > expr
Definition: Analyzer.h:1422
bool unnest
Definition: Analyzer.h:1423
std::string resname
Definition: Analyzer.h:1421

◆ ~TargetEntry()

virtual Analyzer::TargetEntry::~TargetEntry ( )
inlinevirtual

Definition at line 1410 of file Analyzer.h.

1410 {}

Member Function Documentation

◆ get_expr()

Expr* Analyzer::TargetEntry::get_expr ( ) const
inline

Definition at line 1413 of file Analyzer.h.

1413 { return expr.get(); }
std::shared_ptr< Analyzer::Expr > expr
Definition: Analyzer.h:1422

◆ get_own_expr()

std::shared_ptr<Expr> Analyzer::TargetEntry::get_own_expr ( ) const
inline

Definition at line 1414 of file Analyzer.h.

1414 { return expr; }
std::shared_ptr< Analyzer::Expr > expr
Definition: Analyzer.h:1422

◆ get_resname()

const std::string& Analyzer::TargetEntry::get_resname ( ) const
inline

Definition at line 1411 of file Analyzer.h.

1411 { return resname; }
std::string resname
Definition: Analyzer.h:1421

◆ get_unnest()

bool Analyzer::TargetEntry::get_unnest ( ) const
inline

Definition at line 1416 of file Analyzer.h.

1416 { return unnest; }
bool unnest
Definition: Analyzer.h:1423

◆ print()

void Analyzer::TargetEntry::print ( ) const
inline

Definition at line 1418 of file Analyzer.h.

1418 { std::cout << toString(); }
std::string toString() const
Definition: Analyzer.cpp:2563

◆ set_expr()

void Analyzer::TargetEntry::set_expr ( std::shared_ptr< Analyzer::Expr e)
inline

Definition at line 1415 of file Analyzer.h.

1415 { expr = e; }
std::shared_ptr< Analyzer::Expr > expr
Definition: Analyzer.h:1422

◆ set_resname()

void Analyzer::TargetEntry::set_resname ( const std::string &  name)
inline

Definition at line 1412 of file Analyzer.h.

1412 { resname = name; }
std::string resname
Definition: Analyzer.h:1421

◆ toString()

std::string Analyzer::TargetEntry::toString ( ) const

Definition at line 2563 of file Analyzer.cpp.

2563  {
2564  std::string str{"(" + resname + " "};
2565  str += expr->toString();
2566  if (unnest) {
2567  str += " UNNEST";
2568  }
2569  str += ") ";
2570  return str;
2571 }
std::shared_ptr< Analyzer::Expr > expr
Definition: Analyzer.h:1422
bool unnest
Definition: Analyzer.h:1423
std::string resname
Definition: Analyzer.h:1421

Member Data Documentation

◆ expr

std::shared_ptr<Analyzer::Expr> Analyzer::TargetEntry::expr
private

Definition at line 1422 of file Analyzer.h.

◆ resname

std::string Analyzer::TargetEntry::resname
private

Definition at line 1421 of file Analyzer.h.

◆ unnest

bool Analyzer::TargetEntry::unnest
private

Definition at line 1423 of file Analyzer.h.


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