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

A list of requests. More...

#include <QBbgRequestGroup.h>

Public Member Functions

 QBbgRequestGroup ()
 Creates an empty list of requests. More...
 
 QBbgRequestGroup (const QBbgRequestGroup &a)
 Creates a copy of another list of requests. More...
 
qint64 addRequest (const QBbgAbstractRequest &a)
 Adds a request to the list and returns its ID. More...
 
qint64 addRequest (QBbgAbstractRequest &a, qint64 preferredID)
 Adds a request to the list and returns its ID. More...
 
void clear ()
 Removes all requests from the list. More...
 
QList< QBbgAbstractRequest::RequestTypedifferentTypes () const
 Returns a list of all types of requests in the list. More...
 
virtual QList< qint64 > findSecurity (const QBbgSecurity &Secur) const
 Returns the IDs of all the requests for the selected security. More...
 
template<class T = QBbgAbstractRequest>
const T *const getRequest (qint64 ID) const
 Returns the request corresponding to the given ID. More...
 
virtual QList< qint64 > IDList () const
 Returns the IDs of all requests. More...
 
bool isValidReq () const
 Checks if all requests in the list are valid. More...
 
QBbgRequestGroupoperator= (const QBbgRequestGroup &a)
 Copies another list of requests. More...
 
virtual qint32 size () const
 Returns the number of requests in the list. More...
 

Properties

bool isValidReq
 Checks if the request is valid. More...
 
qint32 size
 The number of requests in the list. More...
 

Detailed Description

A list of requests.

This class stores a list of requests to be sent to Bloomberg, the requests will be automatically arranged so that the least ammount of transactions will be sent to the Bloomberg server
Each request will be indexed by a 64bit integer

Constructor & Destructor Documentation

QBbgLib::QBbgRequestGroup::QBbgRequestGroup ( )

Creates an empty list of requests.

QBbgLib::QBbgRequestGroup::QBbgRequestGroup ( const QBbgRequestGroup a)

Creates a copy of another list of requests.

Member Function Documentation

qint64 QBbgLib::QBbgRequestGroup::addRequest ( const QBbgAbstractRequest a)

Adds a request to the list and returns its ID.

This function tries to add the request to the list, if unsuccessful it will return QBbgAbstractRequest::InvalidID

Returns
The actual ID of the request that will be used.
Warning
If you used QBbgAbstractRequest::setID that value will be used as the preferred ID but there is no guarantee the actual request ID will be the selected one, always check the returned value
qint64 QBbgLib::QBbgRequestGroup::addRequest ( QBbgAbstractRequest a,
qint64  preferredID 
)

Adds a request to the list and returns its ID.

This function tries to add the request to the list, if unsuccessful it will return QBbgAbstractRequest::InvalidID

  • a The request to add
  • preferredID the preferred ID for the request
    Returns
    The actual ID of the request that will be used.
    Warning
    If you used QBbgAbstractRequest::setID that value will be overridden by preferredID
    There is no guarantee the actual request ID will be the selected one, always check the returned value
void QBbgLib::QBbgRequestGroup::clear ( )

Removes all requests from the list.

QList<QBbgAbstractRequest::RequestType> QBbgLib::QBbgRequestGroup::differentTypes ( ) const

Returns a list of all types of requests in the list.

virtual QList<qint64> QBbgLib::QBbgRequestGroup::findSecurity ( const QBbgSecurity Secur) const
virtual

Returns the IDs of all the requests for the selected security.

template<class T = QBbgAbstractRequest>
const T* const QBbgLib::QBbgRequestGroup::getRequest ( qint64  ID) const
inline

Returns the request corresponding to the given ID.

  • ID The ID of the request to retrieve
    Template Parameters
    TA QBbgAbstractRequest (default) or a class derived from it
    Returns
    A pointer to the request or NULL if the list does not contain a request of type T with the specified ID
    This function returns the request corresponding to a given ID.
    If the list does not contain a request with that ID, it will return NULL
    If you specify the template parameter to something different from QBbgAbstractRequest the method will return NULL also if the request with the selected ID is not of the type specified
virtual QList<qint64> QBbgLib::QBbgRequestGroup::IDList ( ) const
virtual

Returns the IDs of all requests.

bool QBbgLib::QBbgRequestGroup::isValidReq ( ) const

Checks if all requests in the list are valid.

QBbgRequestGroup& QBbgLib::QBbgRequestGroup::operator= ( const QBbgRequestGroup a)

Copies another list of requests.

virtual qint32 QBbgLib::QBbgRequestGroup::size ( ) const
virtual

Returns the number of requests in the list.

Property Documentation

bool QBbgLib::QBbgRequestGroup::isValidReq
read

Checks if the request is valid.

Read
isValidReq()
qint32 QBbgLib::QBbgRequestGroup::size
read

The number of requests in the list.

Read
size()

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