QBbgLib  0.4
Qt wrapper for the Bloomberg API
Public Types | Public Member Functions | Static Public Member Functions | Properties | Related Functions | List of all members
QBbgLib::QBbgAbstractResponse Class Referenceabstract

Base Class for Bloomberg Responses. More...

#include <QBbgAbstractResponse.h>

Inheritance diagram for QBbgLib::QBbgAbstractResponse:
QBbgLib::QBbgAbstractFieldResponse QBbgLib::QBbgAbstractIntradayResponse QBbgLib::QBbgHistoricalDataResponse QBbgLib::QBbgPortfolioDataResponse QBbgLib::QBbgReferenceDataResponse QBbgLib::QBbgIntradayTickResponse

Public Types

enum  BbgErrorCodesF {
  NoErrors = 0, ResponseError = 0x1, SecurityError = 0x2, InvalidInputs = 0x4,
  SessionError = 0x8, ServiceError = 0x10, FieldError = 0x20, UnknownError = 0x40,
  SessionStopped = 0x80, NoData = 0x100
}
 Flags representing possible errors. More...
 
enum  ResponseType : qint32 {
  ResponseType::Invalid =-1, ResponseType::BeqsResponse, ResponseType::HistoricalDataResponse = FirstFielded, ResponseType::ReferenceDataResponse,
  ResponseType::PortfolioDataResponse, ResponseType::IntraDayTickResponse = FirstRealTime, ResponseType::IntraDayBarResponse
}
 Type of response. More...
 

Public Member Functions

virtual ~QBbgAbstractResponse ()=0
 Destructor. More...
 
virtual BbgErrorCodes errorCode () const
 The error code associated with the response. More...
 
virtual QString errorMessage () const
 The details of the error. More...
 
virtual QString errorString () const
 String representation of the error. More...
 
virtual qint64 getID () const
 The ID of the response. More...
 
virtual bool hasErrors () const
 Checks if the response has any error. More...
 
virtual bool isEmpty () const =0
 Check if the response contains any value. More...
 
virtual QBbgAbstractResponseoperator= (const QBbgAbstractResponse &other)
 Copies another response. More...
 
virtual ResponseType responseType () const
 Returns the type of the current response. More...
 

Static Public Member Functions

static QString bbgErrorCode2String (BbgErrorCodes a)
 Converts an error code to the its string representation. More...
 

Properties

BbgErrorCodes errorCode
 The error code associated with the response. More...
 
QString errorMessage
 The details of the error. More...
 
QString errorString
 String representation of the error. More...
 
bool hasErrors
 Checks if the response has any error. More...
 
bool isEmpty
 Check if the response contains any value. More...
 
qint64 responseID
 The ID of the response. More...
 
ResponseType responseType
 Returns the type of the current response. More...
 

Related Functions

(Note that these are not member functions.)

uint qHash (QBbgLib::QBbgAbstractResponse::ResponseType key, uint seed=0)
 Allows QBbgAbstractResponse::ResponseType to be used as a key of a QHash. More...
 

Detailed Description

Base Class for Bloomberg Responses.

Member Enumeration Documentation

Flags representing possible errors.

Enumerator
NoErrors 

No error occurred

ResponseError 

Response error

SecurityError 

Invalid security

InvalidInputs 

Invalid inputs

SessionError 

Session error

ServiceError 

Service error

FieldError 

Invalid field

UnknownError 

Unknown error

SessionStopped 

Process stopped by user

NoData 

No data available

Type of response.

Enumerator
Invalid 

Invalid Type

BeqsResponse 

Currently Unavailable

HistoricalDataResponse 

Response associated with an historical data request

ReferenceDataResponse 

Response associated with a reference data request

PortfolioDataResponse 

Response associated with a portfolio request

IntraDayTickResponse 

Response associated with tick-by-tick historical data request

IntraDayBarResponse 

Currently Unavailable

Constructor & Destructor Documentation

virtual QBbgLib::QBbgAbstractResponse::~QBbgAbstractResponse ( )
pure virtual

Destructor.

Member Function Documentation

static QString QBbgLib::QBbgAbstractResponse::bbgErrorCode2String ( BbgErrorCodes  a)
static

Converts an error code to the its string representation.

virtual BbgErrorCodes QBbgLib::QBbgAbstractResponse::errorCode ( ) const
virtual

The error code associated with the response.

virtual QString QBbgLib::QBbgAbstractResponse::errorMessage ( ) const
virtual

The details of the error.

This string contains more detailed information regarding the error

virtual QString QBbgLib::QBbgAbstractResponse::errorString ( ) const
virtual

String representation of the error.

This is equivalent to bbgErrorCode2String(errorCode())

virtual qint64 QBbgLib::QBbgAbstractResponse::getID ( ) const
virtual

The ID of the response.

This is the same as the request associated with this response

virtual bool QBbgLib::QBbgAbstractResponse::hasErrors ( ) const
virtual

Checks if the response has any error.

This is equivalent to errorCode() == BbgErrorCodesF::NoErrors

virtual bool QBbgLib::QBbgAbstractResponse::isEmpty ( ) const
pure virtual
virtual QBbgAbstractResponse& QBbgLib::QBbgAbstractResponse::operator= ( const QBbgAbstractResponse other)
virtual

Copies another response.

virtual ResponseType QBbgLib::QBbgAbstractResponse::responseType ( ) const
virtual

Returns the type of the current response.

Friends And Related Function Documentation

uint qHash ( QBbgLib::QBbgAbstractResponse::ResponseType  key,
uint  seed = 0 
)
related

Allows QBbgAbstractResponse::ResponseType to be used as a key of a QHash.

Property Documentation

BbgErrorCodes QBbgLib::QBbgAbstractResponse::errorCode
read

The error code associated with the response.

Read
errorCode()
QString QBbgLib::QBbgAbstractResponse::errorMessage
read

The details of the error.

Read
errorMessage()
QString QBbgLib::QBbgAbstractResponse::errorString
read

String representation of the error.

Read
errorString()
bool QBbgLib::QBbgAbstractResponse::hasErrors
read

Checks if the response has any error.

Read
hasErrors()
bool QBbgLib::QBbgAbstractResponse::isEmpty
read

Check if the response contains any value.

Read
isEmpty()
qint64 QBbgLib::QBbgAbstractResponse::responseID
read

The ID of the response.

Read
getID()
ResponseType QBbgLib::QBbgAbstractResponse::responseType
read

Returns the type of the current response.

Read
responseType()

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