rvm  1.11
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
table Class Reference

#include <table.h>

Collaboration diagram for table:
Collaboration graph

Public Types

typedef std::vector
< table_cell_base * > 
table_row_type
 
typedef std::vector
< table_row_type
table_type
 
typedef table_cell_base::size_type size_type
 

Public Member Functions

 table ()
 
 table (const size_type a_ncols, const size_type a_nrows)
 
 table (const table &a_class)
 
virtual ~table ()
 
virtual void resize (const size_type a_x, const size_type a_y)
 
virtual void insert_row (const size_type a_y)
 
virtual void insert_col (const size_type a_x)
 
virtual void assign (const table &a_class)
 
virtual void assign (const size_type a_x, const size_type a_y, const estring &a_class)
 
virtual void assign (const size_type a_x, const size_type a_y, const table &a_class)
 
size_type col_width (const size_type a_x) const
 
size_type row_width (void) const
 
size_type col_height (void) const
 
size_type row_height (const size_type a_y) const
 
virtual size_type height (void) const
 
virtual size_type width (void) const
 
virtual void write (std::ostream &out, size_type a_line, size_type a_width) const
 
const size_type ncols (void) const
 
const size_type nrows (void) const
 
tableoperator= (const table &a_class)
 
size_type cursor_x (void) const
 
size_type cursor_y (void) const
 
void set_cursor (size_type a_x, size_type a_y)
 
bool eot (void) const
 
void repeat (const bool a_bool)
 

Private Member Functions

void mf_init (void)
 
void mf_add_elt (const table_cell_estring &a_class)
 
void mf_add_elt (const table_cell_table &a_class)
 
void mf_remove_elt (const table_cell_estring &a_class)
 
void mf_remove_elt (const table_cell_table &a_class)
 
void mf_remove_elt (size_type a_x, size_type a_y)
 
void mf_remove_row (size_type a_y)
 

Private Attributes

table_type m_table
 
std::list< table_cell_estringm_list_estring
 
std::list< table_cell_tablem_list_table
 
size_type m_cursor_x
 
size_type m_cursor_y
 
bool m_repeat
 

Detailed Description

Definition at line 96 of file table.h.

Member Typedef Documentation

Definition at line 101 of file table.h.

typedef std::vector<table_cell_base *> table::table_row_type

Definition at line 99 of file table.h.

typedef std::vector<table_row_type> table::table_type

Definition at line 100 of file table.h.

Constructor & Destructor Documentation

table::table ( )

Definition at line 260 of file table.cc.

References mf_init().

Here is the call graph for this function:

table::table ( const size_type  a_ncols,
const size_type  a_nrows 
)

Definition at line 265 of file table.cc.

References m_table, mf_init(), and TRY_nomem.

Here is the call graph for this function:

table::table ( const table a_class)

Definition at line 281 of file table.cc.

References assign(), and mf_init().

Here is the call graph for this function:

table::~table ( )
virtual

Definition at line 287 of file table.cc.

Member Function Documentation

void table::assign ( const table a_class)
virtual

Definition at line 347 of file table.cc.

References m_list_estring, m_list_table, m_table, mf_add_elt(), ncols(), nrows(), and resize().

Referenced by operator=(), table(), table_write(), and test3().

Here is the call graph for this function:

void table::assign ( const size_type  a_x,
const size_type  a_y,
const estring a_class 
)
virtual

Definition at line 374 of file table.cc.

References INTERNAL_ERROR, m_repeat, m_table, mf_add_elt(), mf_remove_elt(), table_cell_base::repeat, table_cell_base::x, and table_cell_base::y.

Here is the call graph for this function:

void table::assign ( const size_type  a_x,
const size_type  a_y,
const table a_class 
)
virtual

Definition at line 402 of file table.cc.

References INTERNAL_ERROR, m_repeat, m_table, mf_add_elt(), mf_remove_elt(), table_cell_base::repeat, table_cell_base::x, and table_cell_base::y.

Here is the call graph for this function:

table::size_type table::col_height ( void  ) const

Definition at line 470 of file table.cc.

References height(), m_table, and row_height().

Referenced by operator<<(), and test3().

Here is the call graph for this function:

table::size_type table::col_width ( const size_type  a_x) const

Definition at line 431 of file table.cc.

References INTERNAL_ERROR, m_table, and width().

Referenced by row_width(), test3(), width(), and write().

Here is the call graph for this function:

table::size_type table::cursor_x ( void  ) const

Definition at line 621 of file table.cc.

References m_cursor_x.

Referenced by table_skip(), and table_write().

table::size_type table::cursor_y ( void  ) const

Definition at line 626 of file table.cc.

References m_cursor_y.

Referenced by table_endl(), table_skip(), and table_write().

bool table::eot ( void  ) const

Definition at line 650 of file table.cc.

References m_cursor_x, m_cursor_y, ncols(), and nrows().

Here is the call graph for this function:

table::size_type table::height ( void  ) const
virtual

Definition at line 504 of file table.cc.

References m_table, and row_height().

Referenced by col_height(), table_cell_table::height(), row_height(), test3(), table_cell_table::write(), and write().

Here is the call graph for this function:

void table::insert_col ( const size_type  a_x)
virtual

Definition at line 332 of file table.cc.

References m_table, and TRY_nomem.

Referenced by table_write(), and test3().

void table::insert_row ( const size_type  a_y)
virtual

Definition at line 315 of file table.cc.

References m_table, ncols(), and TRY_nomem.

Referenced by table_endl(), table_write(), and test3().

Here is the call graph for this function:

void table::mf_add_elt ( const table_cell_estring a_class)
private

Definition at line 671 of file table.cc.

References INTERNAL_ERROR, m_list_estring, m_table, TRY_nomem, table_cell_base::x, and table_cell_base::y.

Referenced by assign().

void table::mf_add_elt ( const table_cell_table a_class)
private
void table::mf_init ( void  )
private

Definition at line 664 of file table.cc.

References m_cursor_x, m_cursor_y, and m_repeat.

Referenced by table().

void table::mf_remove_elt ( const table_cell_estring a_class)
private
void table::mf_remove_elt ( const table_cell_table a_class)
private

Definition at line 727 of file table.cc.

References INTERNAL_ERROR, m_list_table, m_table, table_cell_base::x, and table_cell_base::y.

void table::mf_remove_elt ( table::size_type  a_x,
table::size_type  a_y 
)
private

Definition at line 747 of file table.cc.

References ASSERT, INTERNAL_ERROR, m_list_estring, m_list_table, m_table, and mf_remove_elt().

Here is the call graph for this function:

void table::mf_remove_row ( table::size_type  a_y)
private

Definition at line 785 of file table.cc.

References INTERNAL_ERROR, m_table, and mf_remove_elt().

Referenced by resize().

Here is the call graph for this function:

const table::size_type table::ncols ( void  ) const

Definition at line 549 of file table.cc.

References m_table.

Referenced by assign(), eot(), insert_row(), table_skip(), table_write(), and test3().

const table::size_type table::nrows ( void  ) const

Definition at line 561 of file table.cc.

References m_table.

Referenced by assign(), eot(), table_endl(), table_skip(), table_write(), and test3().

table & table::operator= ( const table a_class)

Definition at line 614 of file table.cc.

References assign().

Here is the call graph for this function:

void table::repeat ( const bool  a_bool)

Definition at line 659 of file table.cc.

References m_repeat.

Referenced by table_repeat().

void table::resize ( const size_type  a_x,
const size_type  a_y 
)
virtual

Definition at line 291 of file table.cc.

References m_table, mf_remove_elt(), mf_remove_row(), and TRY_nomem.

Referenced by assign(), and test3().

Here is the call graph for this function:

table::size_type table::row_height ( const size_type  a_y) const

Definition at line 482 of file table.cc.

References height(), INTERNAL_ERROR, and m_table.

Referenced by col_height(), height(), test3(), and write().

Here is the call graph for this function:

table::size_type table::row_width ( void  ) const

Definition at line 454 of file table.cc.

References col_width(), m_table, and width().

Referenced by operator<<(), and test3().

Here is the call graph for this function:

void table::set_cursor ( table::size_type  a_x,
table::size_type  a_y 
)

Definition at line 631 of file table.cc.

References ERROR, m_cursor_x, m_cursor_y, and m_table.

Referenced by table_endl(), table_rewind(), and table_skip().

table::size_type table::width ( void  ) const
virtual

Definition at line 524 of file table.cc.

References col_width(), and m_table.

Referenced by col_width(), row_width(), test3(), table_cell_table::width(), and write().

Here is the call graph for this function:

void table::write ( std::ostream &  out,
size_type  a_line,
size_type  a_width 
) const
virtual

Definition at line 570 of file table.cc.

References col_width(), estring::fmt_str(), height(), m_table, row_height(), estring::width(), and width().

Referenced by operator<<(), and table_cell_table::write().

Here is the call graph for this function:

Member Data Documentation

size_type table::m_cursor_x
private

Definition at line 153 of file table.h.

Referenced by cursor_x(), eot(), mf_init(), and set_cursor().

size_type table::m_cursor_y
private

Definition at line 154 of file table.h.

Referenced by cursor_y(), eot(), mf_init(), and set_cursor().

std::list<table_cell_estring> table::m_list_estring
private

Definition at line 151 of file table.h.

Referenced by assign(), mf_add_elt(), and mf_remove_elt().

std::list<table_cell_table> table::m_list_table
private

Definition at line 152 of file table.h.

Referenced by assign(), mf_add_elt(), and mf_remove_elt().

bool table::m_repeat
private

Definition at line 155 of file table.h.

Referenced by assign(), mf_init(), and repeat().

table_type table::m_table
private

The documentation for this class was generated from the following files: