OmniSciDB  2e3a973ef4
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 1567 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 1569 of file Analyzer.h.

1570  : resname(n), expr(e), unnest(u) {}
std::shared_ptr< Analyzer::Expr > expr
Definition: Analyzer.h:1583
bool unnest
Definition: Analyzer.h:1584
std::string resname
Definition: Analyzer.h:1582

◆ ~TargetEntry()

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

Definition at line 1571 of file Analyzer.h.

1571 {}

Member Function Documentation

◆ get_expr()

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

Definition at line 1574 of file Analyzer.h.

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

◆ get_own_expr()

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

Definition at line 1575 of file Analyzer.h.

1575 { return expr; }
std::shared_ptr< Analyzer::Expr > expr
Definition: Analyzer.h:1583

◆ get_resname()

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

Definition at line 1572 of file Analyzer.h.

1572 { return resname; }
std::string resname
Definition: Analyzer.h:1582

◆ get_unnest()

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

Definition at line 1577 of file Analyzer.h.

References toString().

1577 { return unnest; }
bool unnest
Definition: Analyzer.h:1584
+ Here is the call graph for this function:

◆ print()

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

Definition at line 1579 of file Analyzer.h.

References toString().

1579 { std::cout << toString(); }
std::string toString() const
Definition: Analyzer.cpp:2793
+ Here is the call graph for this function:

◆ set_expr()

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

Definition at line 1576 of file Analyzer.h.

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

◆ set_resname()

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

Definition at line 1573 of file Analyzer.h.

1573 { resname = name; }
std::string resname
Definition: Analyzer.h:1582

◆ toString()

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

Definition at line 2793 of file Analyzer.cpp.

2793  {
2794  std::string str{"(" + resname + " "};
2795  str += expr->toString();
2796  if (unnest) {
2797  str += " UNNEST";
2798  }
2799  str += ") ";
2800  return str;
2801 }
std::shared_ptr< Analyzer::Expr > expr
Definition: Analyzer.h:1583
bool unnest
Definition: Analyzer.h:1584
std::string resname
Definition: Analyzer.h:1582

Member Data Documentation

◆ expr

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

Definition at line 1583 of file Analyzer.h.

◆ resname

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

Definition at line 1582 of file Analyzer.h.

◆ unnest

bool Analyzer::TargetEntry::unnest
private

Definition at line 1584 of file Analyzer.h.


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