/* fills and prints an array of strings * each string has col,row */ #ifndef _STRINGRID_HPP_ #define _STRINGRID_HPP_ #include #include #include #include using namespace std; // a col,row index pair // first =col, second = row typedef pair stringgrid_index_c; class stringgrid_c { private: map grid; public: unsigned col_count; unsigned row_count; stringgrid_c(); ~stringgrid_c(); void clear(); void set(unsigned col, unsigned row, string s); string *get(unsigned col, unsigned row); vector columm_widths; void calc_columnwidths(void); void print_row(unsigned r, string colsep); void print(string colsep, char titlesep); }; #endif