Column-oriented GPU-accelerated Database Management System
CoGaDB
|
00001 00002 #pragma once 00003 00004 //#include <core/scheduling_decision.hpp> 00005 00006 //#include <boost/shared_ptr.hpp> 00007 00008 #include <query_processing/operator.hpp> 00009 //#include <util/iostream.hpp> 00010 00011 namespace hype { 00012 namespace queryprocessing { 00013 00016 template <typename Type> 00017 class TypedOperator : public hype::queryprocessing::Operator { 00018 public: 00019 typedef Type OperatorOutputType; 00020 00021 TypedOperator(const hype::SchedulingDecision& sched_dec) : Operator(sched_dec), result_(){ 00022 result_size_=0; 00023 } 00024 00025 virtual ~TypedOperator() { 00026 } 00027 00028 const OperatorOutputType getResult() { 00029 //this(); //execute Functor 00030 return result_; 00031 } 00032 00033 virtual bool run() = 0; 00034 00035 virtual void print(unsigned int tree_level = 0) const = 0; 00036 virtual void printResult(unsigned int tree_level = 0) const = 0; 00037 00038 void setResultSize(double result_size) { 00039 result_size_ = result_size; 00040 } 00041 00042 double getResultSize() const { 00043 return result_size_; 00044 } 00045 00046 //virtual std::list<TypedOperator&> getOperatorQueue() = 0; 00047 00048 protected: 00049 OperatorOutputType result_; 00050 double result_size_; 00051 }; 00052 00053 }; //end namespace queryprocessing 00054 }; //end namespace hype