96 inline TextTable(
int width=0,
int height=0,
int maxCellWidth=20):
97 m_texts(width*height),m_size(width,height),m_maxCellWidth(maxCellWidth){}
104 ensureSize(xCell+1, yCell+1);
105 return m_texts[xCell + m_size.width*yCell];
109 void ensureSize(
int width,
int height);
126 inline const std::vector<std::string> &
getData()
const {
return m_texts; }
139 inline void operator=(
const std::vector<std::string> &rowValues){
140 for(
unsigned int i=0;i<rowValues.size();++i){
141 this->t(i,this->row) = rowValues[i];
146 for(
int i=0;i<otherRow.
t.
getSize().width;++i){
147 this->t(i,row) = otherRow.
t(i,otherRow.
row);
158 std::string toString()
const;
int row
parent
Definition: TextTable.h:131
undocument this line if you encounter any issues!
Definition: Any.h:37
Utility class that is used, to assign a table row at once.
Definition: TextTable.h:129
const std::vector< std::string > & getData() const
returns the internal data vector
Definition: TextTable.h:126
int getMaxCellWidth() const
returns the maximum cell width
Definition: TextTable.h:117
TextTable & t
parent TextTable
Definition: TextTable.h:130
void operator=(const std::vector< std::string > &rowValues)
assigns a standard vector of strings (each element is put into a single column)
Definition: TextTable.h:139
#define ICLUtils_API
this macros are important for creating dll's
Definition: CompatMacros.h:171
std::vector< std::string > m_texts
internal text data
Definition: TextTable.h:86
void setMaxCellWidth(int maxCellWidth)
returns the current maxCellWidth value
Definition: TextTable.h:120
RowAssigner operator[](int row)
gives access to the table row (this can be assigned directly if needed)
Definition: TextTable.h:153
RowAssigner(TextTable &t, int row)
Definition: TextTable.h:132
void operator=(RowAssigner otherRow)
assigns the row of another TextTable
Definition: TextTable.h:145
TextTable(int width=0, int height=0, int maxCellWidth=20)
creates a new table with optionally given dimensions
Definition: TextTable.h:96
Size class of the ICL.
Definition: Size.h:61
ICLUtils_API std::ostream & operator<<(std::ostream &s, const ConfigFile &cf)
Default ostream operator to put a ConfigFile into a stream.
Size m_size
current size
Definition: TextTable.h:87
Utility class for pretty console output.
Definition: TextTable.h:85
std::string toString() const
serializes the table to a std::string
int m_maxCellWidth
current maximum cell width for serialization
Definition: TextTable.h:88
std::string & operator()(int xCell, int yCell)
returns a reference to the entry at given cell coordinates
Definition: TextTable.h:103
const Size & getSize() const
returns the current table size
Definition: TextTable.h:123