65 value = (&a_1 == &a_2);
229 if (a_line < m_value->
height()) {
270 for (cy = 0; cy != a_nrows; ++cy) {
273 for (cx = 0; cx != a_ncols; ++cx) {
274 new_row.push_back(static_cast<table_cell_base *>(0));
298 for (cy = 0; cy !=
m_table.size(); ++cy) {
299 while (
m_table[cy].size() > a_x)
309 for (cy = 0; cy !=
m_table.size(); ++cy) {
310 while (
m_table[cy].size() < a_x)
319 table_type::iterator ti;
325 while (new_row.size() < num_cols)
326 TRY_nomem(new_row.push_back(static_cast<table_cell_base *>(0)));
334 table_type::iterator cy;
335 table_row_type::iterator cx;
338 while (a_x > cy->size()) {
339 TRY_nomem(cy->push_back(static_cast<table_cell_base *>(0)));
343 TRY_nomem(cy->insert(cx,static_cast<table_cell_base *>(0)));
349 std::list<table_cell_estring>::const_iterator ctce;
350 std::list<table_cell_table>::const_iterator ctct;
384 es =
"Column index out of bounds: ";
388 if (a_x >=
m_table[a_y].size()) {
389 es =
"Row index out of bounds: ";
412 es =
"Column index out of bounds: ";
416 if (a_x >=
m_table[a_y].size()) {
417 es =
"Row index out of bounds: ";
434 table_type::const_iterator cy;
442 if (a_x >= cy->size()) {
443 es =
"Column index out of bounds: ";
448 width = std::max(width,(*cy)[a_x]->
width());
463 for (cx = 0; cx !=
m_table.begin()->size(); ++cx) {
475 for (y = 0; y !=
m_table.size(); ++y) {
485 table_row_type::const_iterator cx;
492 es =
"Row index out of bounds: ";
498 height = std::max(height, (*cx)->height());
506 table_type::const_iterator cy;
507 table_row_type::const_iterator cx;
513 for (cx = cy->begin(); cx != cy->end(); ++cx) {
515 row_height = std::max(row_height, (*cx)->height());
526 table_type::const_iterator cy;
531 max_x = std::max(max_x, cy->size());
534 for (x = 0; x < max_x; ++x) {
538 if ((x < cy->size()) && ((*cy)[x] != 0)) {
539 col_width = std::max(col_width, (*cy)[x]->
width());
551 table_type::const_iterator cy;
555 cols = std::max(cols,cy->size());
589 for (col = 0; col !=
m_table[row].size(); ++col) {
590 width = std::min(
col_width(col), a_width);
592 m_table[row][col]->write(a_out,a_line,width);
636 es =
"Column index out of bounds: ";
640 if (a_x >=
m_table[a_y].size()) {
641 es =
"Row index out of bounds: ";
676 es =
"Column index out of bounds: ";
680 if (a_class.
x >=
m_table[a_class.
y].size()) {
681 es =
"Row index out of bounds: ";
694 es =
"Column index out of bounds: ";
698 if (a_class.
x >=
m_table[a_class.
y].size()) {
699 es =
"Row index out of bounds: ";
712 es =
"Column index out of bounds: ";
716 if (a_class.
x >=
m_table[a_class.
y].size()) {
717 es =
"Row index out of bounds: ";
732 es =
"Column index out of bounds: ";
736 if (a_class.
x >=
m_table[a_class.
y].size()) {
737 es =
"Row index out of bounds: ";
753 std::list<table_cell_estring>::const_iterator ctce;
754 std::list<table_cell_table>::const_iterator ctct;
757 es =
"Column index out of bounds: ";
761 if (a_x >=
m_table[a_y].size()) {
762 es =
"Row index out of bounds: ";
769 if (*ctce == *
m_table[a_y][a_x]) {
775 if (*ctct == *
m_table[a_y][a_x]) {
788 table_type::iterator ti;
793 es =
"Column index out of bounds: ";
797 for (cx = 0; cx <
m_table[a_y].size(); ++cx) {
814 for (cy = 0; cy != height; ++cy) {
815 a_class.
write(a_out, cy, width);
827 if ((a_table.
ncols() == 0) && (a_table.
nrows() == 0)) {
841 if ((a_table.
ncols() == 0) && (a_table.
nrows() == 0)) {
virtual void assign(const table_cell_table &a_class)
size_type col_height(void) const
Basic types definitions and templates.
table & table_endl(table &a_table)
virtual size_type height(void) const
virtual void assign(const table &a_class)
An extended string class.
table_cell_estring & operator=(const table_cell_estring &a_class)
virtual void write(std::ostream &out, size_type a_line, size_type a_width) const
size_type col_width(const size_type a_x) const
virtual void assign(const table_cell_base &a_class)
virtual void write(std::ostream &out, size_type a_line, size_type a_width) const
virtual ~table_cell_estring()
table & operator=(const table &a_class)
virtual ~table_cell_base()
static const size_type npos
void repeat(const bool a_bool)
table & table_skip(table &a_table)
table & table_write(table &a_table, const estring &a_estr)
void mf_remove_row(size_type a_y)
void mf_add_elt(const table_cell_estring &a_class)
size_type row_height(const size_type a_y) const
virtual ~table_cell_table()
table_cell_base::size_type size_type
virtual size_type width(void) const
size_type cursor_x(void) const
table & table_repeat(table &a_table)
virtual void insert_col(const size_type a_x)
const size_type nrows(void) const
value_type fmt_str(void)
Generate a formatted string.
virtual void insert_row(const size_type a_y)
const size_type ncols(void) const
#define INTERNAL_ERROR(e, s)
virtual size_type width(void) const
virtual size_type height(void) const
virtual void assign(const table_cell_estring &a_class)
virtual void resize(const size_type a_x, const size_type a_y)
virtual size_type height(void) const
size_type width(const size_type a_l)
Set the width of a formatted string.
virtual size_type height(void) const
std::vector< table_cell_base * > table_row_type
std::list< table_cell_estring > m_list_estring
size_type cursor_y(void) const
size_type row_width(void) const
table_cell_table & operator=(const table_cell_table &a_class)
table & table_rewind(table &a_table)
virtual void write(std::ostream &out, size_type a_line, size_type a_width) const
bool operator==(const table_cell_base &a_1, const table_cell_base &a_2)
estring::size_type size_type
void set_cursor(size_type a_x, size_type a_y)
std::ostream & operator<<(std::ostream &a_out, table &a_class)
virtual void write(std::ostream &out, size_type a_line, size_type a_width) const
void mf_remove_elt(const table_cell_estring &a_class)
table_cell_base & operator=(const table_cell_base &a_class)
virtual size_type width(void) const
std::list< table_cell_table > m_list_table
virtual size_type width(void) const