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

A response for historical data series. More...

#include <QBbgHistoricalDataResponse.h>

Inheritance diagram for QBbgLib::QBbgHistoricalDataResponse:
QBbgLib::QBbgAbstractFieldResponse QBbgLib::QBbgAbstractResponse

Public Member Functions

 QBbgHistoricalDataResponse ()
 Creates an empty historical response. More...
 
 QBbgHistoricalDataResponse (const QBbgHistoricalDataResponse &other)
 Creates a copy of another historical response. More...
 
virtual ~QBbgHistoricalDataResponse ()
 Destructor. More...
 
virtual QDate date (int period) const
 Returns the nth date in the series. More...
 
virtual QDate dateForPeriod (const QString &period) const
 Returns the date associated with the selected period in the series. More...
 
virtual QList< QDate > dates () const
 Returns all dates in the series. More...
 
virtual QList< QDate > findValues (const QVariant &a) const
 Returns all the dates for which the series has the selected value. More...
 
virtual bool isEmpty () const
 Reimplemented from QBbgAbstractResponse::isEmpty() More...
 
virtual QBbgHistoricalDataResponseoperator= (const QBbgHistoricalDataResponse &other)
 Copies another historical response. More...
 
virtual QString periodForDate (const QDate &a) const
 Returns the period code for the selected date in the series. More...
 
virtual QList< QString > periods () const
 Returns all period codes in the series. More...
 
virtual int size () const
 Number of values in the series. More...
 
virtual QVariant value (const QDate &a) const
 Returns the value associated for the selected date. More...
 
virtual QVariant value (const QString &period) const
 Returns the value associated with the selected period in the series. More...
 
virtual QVariant value (int period) const
 Returns the value for the nth element in the series. More...
 
- Public Member Functions inherited from QBbgLib::QBbgAbstractFieldResponse
virtual ~QBbgAbstractFieldResponse ()=0
 Destructor. More...
 
virtual const QString & header () const
 Header for the response. More...
 
virtual QBbgAbstractFieldResponseoperator= (const QBbgAbstractFieldResponse &a)
 Copies another field response. More...
 
- Public Member Functions inherited from QBbgLib::QBbgAbstractResponse
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 QBbgAbstractResponseoperator= (const QBbgAbstractResponse &other)
 Copies another response. More...
 
virtual ResponseType responseType () const
 Returns the type of the current response. More...
 

Properties

QList< QDate > dates
 All dates in the series. More...
 
QList< QString > periods
 All period codes in the series. More...
 
int size
 Number of values in the series. More...
 
- Properties inherited from QBbgLib::QBbgAbstractFieldResponse
QString header
 Header for the response. More...
 
- Properties inherited from QBbgLib::QBbgAbstractResponse
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...
 

Additional Inherited Members

- Public Types inherited from QBbgLib::QBbgAbstractResponse
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...
 
- Static Public Member Functions inherited from QBbgLib::QBbgAbstractResponse
static QString bbgErrorCode2String (BbgErrorCodes a)
 Converts an error code to the its string representation. More...
 

Detailed Description

A response for historical data series.

Constructor & Destructor Documentation

virtual QBbgLib::QBbgHistoricalDataResponse::~QBbgHistoricalDataResponse ( )
virtual

Destructor.

QBbgLib::QBbgHistoricalDataResponse::QBbgHistoricalDataResponse ( )

Creates an empty historical response.

QBbgLib::QBbgHistoricalDataResponse::QBbgHistoricalDataResponse ( const QBbgHistoricalDataResponse other)

Creates a copy of another historical response.

Member Function Documentation

virtual QDate QBbgLib::QBbgHistoricalDataResponse::date ( int  period) const
virtual

Returns the nth date in the series.

virtual QDate QBbgLib::QBbgHistoricalDataResponse::dateForPeriod ( const QString &  period) const
virtual

Returns the date associated with the selected period in the series.

Use:

  • CY1 yyyy for yearly data
  • CS# yyyy for semiannual data where # is 1 or 2
  • CQ# yyyy for quarterly data where # is 1, 2, 3 or 4

replacing yyyy with the year you want to retrieve the date for

Note
This method will work only if you called QBbgHistoricalDataRequest::setUseRelativeDate(true) on its associated request
virtual QList<QDate> QBbgLib::QBbgHistoricalDataResponse::dates ( ) const
virtual

Returns all dates in the series.

virtual QList<QDate> QBbgLib::QBbgHistoricalDataResponse::findValues ( const QVariant &  a) const
virtual

Returns all the dates for which the series has the selected value.

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

Copies another historical response.

virtual QString QBbgLib::QBbgHistoricalDataResponse::periodForDate ( const QDate &  a) const
virtual

Returns the period code for the selected date in the series.

Note
This method will work only if you called QBbgHistoricalDataRequest::setUseRelativeDate(true) on its associated request
virtual QList<QString> QBbgLib::QBbgHistoricalDataResponse::periods ( ) const
virtual

Returns all period codes in the series.

Note
This method will work only if you called QBbgHistoricalDataRequest::setUseRelativeDate(true) on its associated request
virtual int QBbgLib::QBbgHistoricalDataResponse::size ( ) const
virtual

Number of values in the series.

virtual QVariant QBbgLib::QBbgHistoricalDataResponse::value ( const QDate &  a) const
virtual

Returns the value associated for the selected date.

virtual QVariant QBbgLib::QBbgHistoricalDataResponse::value ( const QString &  period) const
virtual

Returns the value associated with the selected period in the series.

Use:

  • CY1 yyyy for yearly data
  • CS# yyyy for semiannual data where # is 1 or 2
  • CQ# yyyy for quarterly data where # is 1, 2, 3 or 4

replacing yyyy with the year you want to retrieve the data for

Note
This method will work only if you called QBbgHistoricalDataRequest::setUseRelativeDate(true) on its associated request
virtual QVariant QBbgLib::QBbgHistoricalDataResponse::value ( int  period) const
virtual

Returns the value for the nth element in the series.

Property Documentation

QList<QDate> QBbgLib::QBbgHistoricalDataResponse::dates
read

All dates in the series.

Read
dates()
QList<QString> QBbgLib::QBbgHistoricalDataResponse::periods
read

All period codes in the series.

Read
periods()
int QBbgLib::QBbgHistoricalDataResponse::size
read

Number of values in the series.

Read
size()

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