class IO2GTableManagerListener

Parents
IAddRef

Brief

The interface provides a method signature to process notifications about table manager status changes.

Details

In order to work with the trading tables, an IO2GTableManager object must have the O2GTableManagerStatus.TablesLoaded status.

You can track the O2GTableManagerStatus by using an instance of the class that implements the IO2GTableManagerListener interface. The table manager status is checked asynchronously. Therefore, your application can run without interruption the processes that are not directly dependent on the table manager status. For example, if your application requires loading of the GUI components, they are loaded without any interruptions.
Note: If you do not require any special processing and can afford a temporal suspension of the main thread, you can track the table manager status by using the IO2GTableManager.getStatus method. In this case, the implementation of the IO2GTableManagerListener is not required.

If you want to use the IO2GTableManagerListener interface to track the table manager status, you must create a class that implements the interface. For example,
class TableManagerListener : public IO2GTableManagerListener { }

Then, you must create an instance of the class, pass the instance to the IO2GSession.useTableManager method and wait for the TablesLoaded status.

Waiting for the status [hide]

         O2G2Ptr<TableManagerListener> managerListener = new TableManagerListener();
         mSession->useTableManager(Yes, managerListener);
         //...
         if(managerListener->waitForTablesLoad())
         {
             O2G2Ptr<IO2GTableManager> tableManager = mSession->getTableManager();
             //...
         }

For details of the IO2GTableManagerListener interface implementation, see the example below.

Example

TableManagerListener [show]

Public Methods

onStatusChanged

Processes notifications about the table manager status changes.

back