|
Public Types |
typedef std::vector< std::string > | strings_t |
enum | error_codes_t {
TABLE_OK = 0,
TABLE_NOHEADERS = 1,
TABLE_MULTIHEADERS = 2,
TABLE_TOOFEW = 3,
TABLE_TOOMANY = 4
} |
Public Member Functions |
| gxXmlTable () |
virtual | ~gxXmlTable () |
int | addHeaders (std::list< std::string > &items) |
int | addHeaders (const char *item1, const char *item2=NULL, const char *item3=NULL, const char *item4=NULL) |
| Convenience method for adding headers with up to 4 columns.
|
int | addRow (std::list< std::string > &items) |
int | addRow (const char *item1, const char *item2=NULL, const char *item3=NULL, const char *item4=NULL) |
| Convenience method for adding a row with up to 4 columns.
|
int | getColumnCount () |
| Return the number of columns in the table.
|
std::string | getColumnText (int index) |
| Return the column header text for the specified, zero-based index.
|
int | getColumnIndex (const char *text) |
| Return the column header index with the given label.
|
std::string | getId () |
| Returns the table id.
|
int | getRowCount () |
| Returns the number of rows in the table.
|
std::string | getItem (int rowIndex, int columnIndex) |
| Gets the text items at the specified row/column index.
|
void | setId (const char *id) |
void | write (std::ostream &out) |
| When sending table messages, create the table using addHeaders and add row, then invoke this method to write the XML to a stream.
|
The document is enclosed by a "table" tag. It has a sequence of "tr" rows. The first row contains a series of "th" elements. All subsequent rows contain a series of "td" elements.
This class is not intended to be used with HTML however. Its just a convenient way to pass around two-dimensional lists, such as the name and clsid of all soft synths in the system.