public method IO2GClosedTradesTable.getNextRow

Brief

Gets the next row from the IO2GClosedTradesTable.

Declaration
C++
virtual bool  getNextRow (IO2GTableIterator & iterator, IO2GClosedTradeTableRow *& row) = 0

Parameters
iterator

The table iterator.

row

[out] The row fetched.

Details

If the row is not found, the method returns false.

Example

Get next row from the Closed Trades table [hide]

    O2G2Ptr<IO2GClosedTradesTable> closedTradesTable = (IO2GClosedTradesTable *)tableManager->getTable(ClosedTrades);
    IO2GTableIterator iterator;
    IO2GClosedTradeTableRow *closedTrade = NULL;
    while (closedTradesTable->getNextRow(iterator, closedTrade))
    {
        std::cout << "TradeID: " << closedTrade->getTradeID() <<
                     " CloseRate = " << closedTrade->getCloseRate() <<
                     " GrossPL= " << closedTrade->getGrossPL() << std::endl;
        closedTrade->release();
    }

Note: The returned row contains the current values of fields. The values are not automatically updated. To monitor changes, use IO2GTableListener.onChanged. The row interface is thread-safe. One can use the returned row in different threads without synchronization.

Declared in IO2GClosedTradesTable

back