// Project ID: C0F4DFE8B340D81183C208F70F9D2D797908754D #include #include "TableEntry.h" #include #include using namespace std; struct Metadata { enum class Datatype {String, Int, Bool, Double} datatype; }; struct Table { vector> columns; vector> data; unordered_map> unorderedMapIndex; int unorderedMapIndexColNum; map> orderedMapIndex; int orderedMapIndexColNum; bool bstIndex; bool hashIndex; }; class equalFunctor { public: equalFunctor(int colNo, TableEntry te_in) : te(te_in), index(colNo) {} bool operator() (const vector &te2) const { return te == te2[static_cast(index)]; } private: TableEntry te; int index; }; class greaterFunctor { public: greaterFunctor(int colNo, TableEntry te_in) : te(te_in), index(colNo) {} bool operator() (const vector &te2) const { return te > te2[static_cast(index)]; } private: TableEntry te; int index; }; class lessFunctor { public: lessFunctor(int colNo, TableEntry te_in) : te(te_in), index(colNo) {} bool operator() (const vector &te2) const { return te < te2[static_cast(index)]; } private: TableEntry te; int index; };