QBbgLib  0.4
Qt wrapper for the Bloomberg API
Signals | Public Member Functions | Properties | List of all members
QBbgLib::QBbgManager Class Reference

The central Bloomberg manager. More...

#include <QBbgManager.h>

Inheritance diagram for QBbgLib::QBbgManager:

Signals

void allFinished ()
 This will emitted when no more request are running. More...
 
void finished (quint32)
 When a group of results is processed this will be emitted with the associated group ID. More...
 
void recieved (quint32, qint64)
 When a single result is recieved its group ID and its id inside the group are emitted. More...
 

Public Member Functions

 QBbgManager (QObject *parent=nullptr)
 Constructs a Bloomberg manager. More...
 
virtual ~QBbgManager ()
 Destructor. More...
 
template<class T = QBbgAbstractResponse>
const T *const getResult (quint32 group, qint64 id) const
 Returns a result. More...
 
QList< quint32 > getResultGroups () const
 Returns a list of all available result group IDs. More...
 
QList< qint64 > getResultIDs (quint32 group) const
 Returns a list of all request IDs associated with the given group ID. More...
 
const QHash< qint64, QBbgAbstractResponse * > & processRequest (const QBbgRequestGroup &rq)
 Starts the group of requests synchronously. More...
 
const QBbgReferenceDataResponse *const processRequest (const QBbgReferenceDataRequest &rq)
 Starts the request synchronously. More...
 
const QBbgHistoricalDataResponse *const processRequest (const QBbgHistoricalDataRequest &rq)
 Starts the request synchronously. More...
 
const QBbgPortfolioDataResponse *const processRequest (const QBbgPortfolioDataRequest &rq)
 Starts the request synchronously. More...
 
const QBbgIntradayTickResponse *const processRequest (const QBbgIntradayTickRequest &rq)
 Starts the request synchronously. More...
 
const QBbgAbstractResponse *const processRequest (const QBbgAbstractRequest &rq)
 Starts the request synchronously. More...
 
quint32 processRequestID (const QBbgRequestGroup &rq)
 Starts the group of requests synchronously. More...
 
quint32 processRequestID (const QBbgAbstractRequest &rq)
 Starts the request synchronously. More...
 
quint32 startRequest (const QBbgRequestGroup &rq)
 Starts the group of requests asynchronously. More...
 
quint32 startRequest (const QBbgAbstractRequest &rq)
 Starts the request asynchronously. More...
 

Properties

QList< quint32 > resultGroups
 A list of all available result group IDs. More...
 

Detailed Description

The central Bloomberg manager.

This is the main class of the library.
This class is in charge of sending the requests and collecting the responses from Bloomberg.

Warning
A QCoreApplication must be created before sending any request

Constructor & Destructor Documentation

QBbgLib::QBbgManager::QBbgManager ( QObject *  parent = nullptr)

Constructs a Bloomberg manager.

virtual QBbgLib::QBbgManager::~QBbgManager ( )
virtual

Destructor.

Member Function Documentation

void QBbgLib::QBbgManager::allFinished ( )
signal

This will emitted when no more request are running.

void QBbgLib::QBbgManager::finished ( quint32  )
signal

When a group of results is processed this will be emitted with the associated group ID.

template<class T = QBbgAbstractResponse>
const T* const QBbgLib::QBbgManager::getResult ( quint32  group,
qint64  id 
) const
inline

Returns a result.

This method will return the result identified by the group ID and the ID within the group.
If the selected result does not exist, it has not been downloaded yet or is not of type T a null pointer will be returned.

Template Parameters
TThe type of response to retrieve
QList<quint32> QBbgLib::QBbgManager::getResultGroups ( ) const

Returns a list of all available result group IDs.

QList<qint64> QBbgLib::QBbgManager::getResultIDs ( quint32  group) const

Returns a list of all request IDs associated with the given group ID.

const QHash<qint64, QBbgAbstractResponse* >& QBbgLib::QBbgManager::processRequest ( const QBbgRequestGroup rq)

Starts the group of requests synchronously.

This function will start a group of requests and return the individual results.
The program will wait until the process is finished.
If the request is invalid the program will crash.

Returns
A hash table with key the ID of the request and value a pointer to the response that has then to be dynamic_casted into the appropriate type
Deprecated:
Use processRequestID(const QBbgRequestGroup&) and getResult() instead
const QBbgReferenceDataResponse* const QBbgLib::QBbgManager::processRequest ( const QBbgReferenceDataRequest rq)

Starts the request synchronously.

This function will start a request and return its result.
The program will wait until the process is finished.
If the request is invalid a null pointer will be returned.

const QBbgHistoricalDataResponse* const QBbgLib::QBbgManager::processRequest ( const QBbgHistoricalDataRequest rq)

Starts the request synchronously.

This function will start a request and return its result.
The program will wait until the process is finished.
If the request is invalid a null pointer will be returned.

const QBbgPortfolioDataResponse* const QBbgLib::QBbgManager::processRequest ( const QBbgPortfolioDataRequest rq)

Starts the request synchronously.

This function will start a request and return its result.
The program will wait until the process is finished.
If the request is invalid a null pointer will be returned.

const QBbgIntradayTickResponse* const QBbgLib::QBbgManager::processRequest ( const QBbgIntradayTickRequest rq)

Starts the request synchronously.

This function will start a request and return its result.
The program will wait until the process is finished.
If the request is invalid a null pointer will be returned.

const QBbgAbstractResponse* const QBbgLib::QBbgManager::processRequest ( const QBbgAbstractRequest rq)

Starts the request synchronously.

This function will start a request and return its result.
The program will wait until the process is finished.
If the request is invalid a null pointer will be returned.

quint32 QBbgLib::QBbgManager::processRequestID ( const QBbgRequestGroup rq)

Starts the group of requests synchronously.

This function will start a group of requests and return its ID.
The program will wait until the process is finished.
If the request is invalid 0 will be returned.

Note
The returned ID does not depend from the one set in any single request
quint32 QBbgLib::QBbgManager::processRequestID ( const QBbgAbstractRequest rq)

Starts the request synchronously.

This function will start a request and return its ID.
The program will wait until the process is finished.
If the request is invalid 0 will be returned.

Note
The returned ID does not depend from the one set in the single request
void QBbgLib::QBbgManager::recieved ( quint32  ,
qint64   
)
signal

When a single result is recieved its group ID and its id inside the group are emitted.

quint32 QBbgLib::QBbgManager::startRequest ( const QBbgRequestGroup rq)

Starts the group of requests asynchronously.

This function will start a group of requests and return its ID.
When the process is completed it will emit finished with the same ID as the returned one.
If the request is invalid 0 will be returned.

Note
The returned ID does not depend from the one set in any single request
quint32 QBbgLib::QBbgManager::startRequest ( const QBbgAbstractRequest rq)

Starts the request asynchronously.

This function will start a request and return its ID.
When the process is completed it will emit finished with the same ID as the returned one.
If the request is invalid 0 will be returned.

Note
The returned ID does not depend from the one set in the single request

Property Documentation

QList<quint32> QBbgLib::QBbgManager::resultGroups
read

A list of all available result group IDs.

Read
getResultGroups()

The documentation for this class was generated from the following file: