00001 // File: $Id$ 00002 // Author: John Wu <John.Wu at ACM.org> 00003 // Copyright 2010-2011 the Regents of the University of California 00004 #ifndef IBIS_FILTER_H 00005 #define IBIS_FILTER_H 00006 00014 #include "quaere.h" // ibis::quaere 00015 #include "whereClause.h" // ibis::whereClause 00016 #include "selectClause.h" // ibis::selectClause 00017 00018 namespace ibis { 00019 class filter; // forward definition 00020 } // namespace ibis 00021 00025 class ibis::filter : public ibis::quaere { 00026 public: 00028 explicit filter(const ibis::whereClause* w); 00030 filter(const ibis::selectClause* s, const ibis::partList* p, 00031 const ibis::whereClause* w); 00033 virtual ~filter(); 00034 00035 virtual void roughCount(uint64_t& nmin, uint64_t& nmax) const; 00036 virtual int64_t count() const; 00037 virtual table* select() const; 00038 virtual table* select(const ibis::table::stringList& colnames) const; 00039 00040 static table* filt(const ibis::selectClause &sel, 00041 const ibis::partList &pl, 00042 const ibis::whereClause &wc); 00043 00044 protected: 00046 const ibis::whereClause *wc_; 00048 const ibis::partList *parts_; 00052 const ibis::selectClause *sel_; 00053 00056 filter() : wc_(0), parts_(0), sel_(0) {} 00057 00058 private: 00059 filter(const filter&); // no copying 00060 filter& operator=(const filter&); // no assignment 00061 }; // class ibis::filter 00062 #endif
![]() |