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

#include <Planner.h>

+ Inheritance diagram for Planner::Sort:
+ Collaboration diagram for Planner::Sort:

Public Member Functions

 Sort (const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &t, double c, Plan *p, const std::list< Analyzer::OrderEntry > &oe, bool d)
 
const std::list
< Analyzer::OrderEntry > & 
get_order_entries () const
 
bool get_remove_duplicates () const
 
void print () const override
 
- Public Member Functions inherited from Planner::Plan
 Plan (const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &t, const std::list< std::shared_ptr< Analyzer::Expr >> &q, double c, Plan *p)
 
 Plan (const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &t, double c, Plan *p)
 
 Plan ()
 
 Plan (const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &t)
 
virtual ~Plan ()
 
const std::vector
< std::shared_ptr
< Analyzer::TargetEntry > > & 
get_targetlist () const
 
const std::list
< std::shared_ptr
< Analyzer::Expr > > & 
get_quals () const
 
double get_cost () const
 
const Planget_child_plan () const
 
void add_tle (std::shared_ptr< Analyzer::TargetEntry > tle)
 
void set_targetlist (const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &t)
 

Private Attributes

std::list< Analyzer::OrderEntryorder_entries
 
bool remove_duplicates
 

Additional Inherited Members

- Protected Attributes inherited from Planner::Plan
std::vector< std::shared_ptr
< Analyzer::TargetEntry > > 
targetlist
 
std::list< std::shared_ptr
< Analyzer::Expr > > 
quals
 
double cost
 
std::unique_ptr< Planchild_plan
 

Detailed Description

Definition at line 245 of file Planner.h.

Constructor & Destructor Documentation

Planner::Sort::Sort ( const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &  t,
double  c,
Plan p,
const std::list< Analyzer::OrderEntry > &  oe,
bool  d 
)
inline

Definition at line 247 of file Planner.h.

252  : Plan(t, c, p), order_entries(oe), remove_duplicates(d) {}
std::list< Analyzer::OrderEntry > order_entries
Definition: Planner.h:261
bool remove_duplicates
Definition: Planner.h:262

Member Function Documentation

const std::list<Analyzer::OrderEntry>& Planner::Sort::get_order_entries ( ) const
inline

Definition at line 253 of file Planner.h.

References order_entries.

253  {
254  return order_entries;
255  }
std::list< Analyzer::OrderEntry > order_entries
Definition: Planner.h:261
bool Planner::Sort::get_remove_duplicates ( ) const
inline

Definition at line 256 of file Planner.h.

References remove_duplicates.

256 { return remove_duplicates; }
bool remove_duplicates
Definition: Planner.h:262
void Planner::Sort::print ( ) const
overridevirtual

Reimplemented from Planner::Plan.

Definition at line 439 of file Planner.cpp.

References Planner::Plan::child_plan, order_entries, and Planner::Plan::print().

439  {
440  std::cout << "(Sort" << std::endl;
441  Plan::print();
442  child_plan->print();
443  std::cout << "Order By: ";
444  for (auto o : order_entries) {
445  o.print();
446  }
447  std::cout << ")" << std::endl;
448 }
std::unique_ptr< Plan > child_plan
Definition: Planner.h:70
std::list< Analyzer::OrderEntry > order_entries
Definition: Planner.h:261
virtual void print() const
Definition: Planner.cpp:356

+ Here is the call graph for this function:

Member Data Documentation

std::list<Analyzer::OrderEntry> Planner::Sort::order_entries
private

Definition at line 261 of file Planner.h.

Referenced by get_order_entries(), and print().

bool Planner::Sort::remove_duplicates
private

Definition at line 262 of file Planner.h.

Referenced by get_remove_duplicates().


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