public method IO2GOffersTable.findRow

Brief

Finds a row in the IO2GOffersTable by an OfferID.

Declaration
C++
virtual bool  findRow (const char * id, IO2GOfferTableRow *& row) = 0

Parameters
id

The unique identification number of an instrument.

row

[out] The row fetched.

Details

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

Example

Find offer by OfferID [hide]

    O2G2Ptr<IO2GOffersTable> offersTable = (IO2GOffersTable)tableManager->getTable(Offers);
    IO2GOfferTableRow *offer = NULL;
    if (offersTable.findRow(mOfferID.c_str(), offer))
    {
        std::cout << "Instrument: " << offer->getInstrument() <<
                     " Bid = " << offer->getBid() <<
                     " Ask = " << offer->getAsk() << std::endl;
        offer->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 IO2GOffersTable

back