class IO2GTableColumnCollection
| Parents | |
IAddRef |
|
Brief
The class provides access to the list of table columns.
Details
To get an instance of the class, use the
IO2GGenericTableResponseReader.columns
method. For example,
O2GTableColumnCollection columns = genericReader.getColumns();
To get access to a particular column, use the get method of the class. For example,
O2GTableColumn column = columns.get(mColumnID);
To get access to every table column, call another implementation of the get method in a loop. For example,
for (int i = 0; i < columns.size(); i++) {
O2GTableColumn column = columns.get(i);
}
Example
Get column identifiers and data types [hide]
void useGenericReader(IO2GGenericTableResponseReader *genericReader)
{
O2G2Ptr<IO2GTableColumnCollection> columns = genericReader->getColumns();
for (int i = 0; i < columns->size(); i++)
{
O2G2Ptr<IO2GTableColumn> column = columns->get(i);
std::cout << "Identifier: " << column->getID() << " Data Type: " << column->getType() << std::endl;
}
}
| Public Methods | |
|
Gets a column by its unique identifier. |
|
|
Gets a column by its index. |
|
|
Gets the number of columns in a table. |
|