///////////////////////////////////////////////////// // MT2Q5.cpp - Display Table // // // // Jim Fawcett, CSE687 - OOD Midterm, Spring 2013 // ///////////////////////////////////////////////////// #include #include #include #include #include "../MTutility/MTutility.h" typedef std::vector Schema; typedef std::vector Row; typedef std::vector Table; /* * Here's the idea: show Table -> show Row -> show Cell -> out << setw(w) << cellData */ class Display { public: Display(std::ostream& out) : _out(out) { out.setf(std::ios::right, std::ios::adjustfield); } void ShowBorder(const Schema& schema) { _out.fill('-'); for(size_t colCount=0; colCount