public method IO2GOffersTable.getNextRowByColumnValues
Brief
Gets the next row from IO2GOffersTable
based on any of the column values.
Declaration | ||||
|
Parameters | |
columnName |
The name of a column in the Offers table. For example, |
valueCount |
Number of values of the column. |
columnValues |
The values of the column specified by the |
iterator |
The table iterator. |
row |
[out] The row fetched. |
Details
This method allows finding all rows that contain any of the specified column values.
If the row is not found, the method returns false
.
Example
Get instruments from the Offers table with specified PointSize [hide]
O2G2Ptr<IO2GOffersTable> offersTable = (IO2GOffersTable *)tableManager->getTable(Offers); bool found = false; IO2GTableIterator iterator; IO2GOfferTableRow *offer = NULL; const double dec = 0.1; const double hun = 0.01; const double tho = 0.001; const void *columnValues[] = {(void *)&dec, (void *)&hun, (void *)&tho}; while (offersTable->getNextRowByColumnValues("PointSize", 3, columnValues, iterator, offer)) { found = true; std::cout << "Instrument: " << offer->getInstrument() << " Bid = " << offer->getBid() << " Ask = " << offer->getAsk() << std::endl; offer->release(); } if (!found) std::cout << "No instruments found." << std:endl;
Note: The returned row contains the current column values. The values are not automatically updated. To monitor
changes, use IO2GTableListener.onChanged
.
The row interface is thread-safe. The returned row can be used in different threads without synchronization.
Declared in IO2GOffersTable