public method IO2GTableManager.getStatus

Brief

Gets a table manager status.

Declaration
C++
virtual O2GTableManagerStatus  getStatus () = 0

Details

The table manager status defines wheather the trading tables data can be used or not.

The possible return values are as follows:

TablesLoadFailed

The loading of at least one of the trading tables has failed. The trading tables data cannot be used.

TablesLoaded

All trading tables have been loaded from the trading server into the ForexConnect memory. The trading tables data can be used.

TablesLoading

The trading tables are being loaded from the trading server into the ForexConnect memory. The trading tables data cannot be used.

Example

Getting the table manager status [hide]

    mSession->useTableManager(Yes, NULL);
    //...
    O2G2Ptr<IO2GTableManager> tableManager = mSession->getTableManager();
    while (tableManager->getStatus() != TablesLoaded &&
           tableManager->getStatus() != TablesLoadFailed)
    {
        uni::Sleep(50);
    }
    if (tableManager->getStatus() == TablesLoaded)
    {
        //...
    }

Note: The method has the following disadvantage: your thread is suspended and cannot be used while you are waiting for the TablesLoaded status. For example, if your application requires loading of the GUI components or some other processing that is not directly dependent on the status of the table manager, these processes are also suspended. If you cannot afford a temporary suspension of the main thread, your application must implement the IO2GTableManagerListener.onStatusChanged method to get a table manager status.

Declared in IO2GTableManager

back