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

A response for portfolio information. More...

#include <QBbgPortfolioDataResponse.h>

Inheritance diagram for QBbgLib::QBbgPortfolioDataResponse:
QBbgLib::QBbgAbstractFieldResponse QBbgLib::QBbgAbstractResponse

Public Member Functions

 QBbgPortfolioDataResponse ()
 Creates an empty portfolio response. More...
 
 QBbgPortfolioDataResponse (const QBbgPortfolioDataResponse &other)
 Creates a copy of another portfolio response. More...
 
virtual ~QBbgPortfolioDataResponse ()
 Destructor. More...
 
virtual double cost (int index) const
 Returns the cost of the nth security in the portfolio. More...
 
virtual QDate costDate (int index) const
 Returns the cost date of the nth security in the portfolio. More...
 
virtual double costFx (int index) const
 Returns the cost FX rate of the nth security in the portfolio. More...
 
virtual bool hasCost () const
 Checks if result contains the cost of the securities in the portfolio. More...
 
virtual bool hasCostDate () const
 Checks if result contains the cost date of the securities in the portfolio. More...
 
virtual bool hasCostFx () const
 Checks if result contains the cost FX rate of the securities in the portfolio. More...
 
virtual bool hasMarketValue () const
 Checks if result contains the market value of the securities in the portfolio. More...
 
virtual bool hasPosition () const
 Checks if result contains the nominal amount of the securities in the portfolio. More...
 
virtual bool hasWeight () const
 Checks if result contains the relative weight of the securities in the portfolio. More...
 
virtual bool isEmpty () const
 Reimplemented from QBbgAbstractResponse::isEmpty() More...
 
virtual double marketValue (int index) const
 Returns the market value of the nth security in the portfolio. More...
 
virtual QBbgPortfolioDataResponseoperator= (const QBbgPortfolioDataResponse &other)
 Copies another portfolio response. More...
 
virtual double position (int index) const
 Returns the nominal amount of the nth security in the portfolio. More...
 
virtual QBbgSecurity security (int index) const
 Returns the nth security in the list. More...
 
virtual int size () const
 Returns the number of securities in the portfolio. More...
 
virtual double weight (int index) const
 Returns the cost relative weight of the nth security in the portfolio. 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

bool hasCost
 The result contains the cost of the securities in the portfolio. More...
 
bool hasCostDate
 The result contains the cost date of the securities in the portfolio. More...
 
bool hasCostFx
 The result contains the cost FX rate of the securities in the portfolio. More...
 
bool hasMarketValue
 The result contains the market value of the securities in the portfolio. More...
 
bool hasPosition
 The result contains the nominal amount of the securities in the portfolio. More...
 
bool hasWeight
 The result contains the relative weight of the securities in the portfolio. More...
 
int size
 Number of securities in the portfolio. 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 portfolio information.

The results will be ordered by currency then by yellow key then by security name. Cash will always appear at the end of the list.

Constructor & Destructor Documentation

virtual QBbgLib::QBbgPortfolioDataResponse::~QBbgPortfolioDataResponse ( )
virtual

Destructor.

QBbgLib::QBbgPortfolioDataResponse::QBbgPortfolioDataResponse ( )

Creates an empty portfolio response.

QBbgLib::QBbgPortfolioDataResponse::QBbgPortfolioDataResponse ( const QBbgPortfolioDataResponse other)

Creates a copy of another portfolio response.

Member Function Documentation

virtual double QBbgLib::QBbgPortfolioDataResponse::cost ( int  index) const
virtual

Returns the cost of the nth security in the portfolio.

If index is out of range or hasCost() is false, 0 returned

virtual QDate QBbgLib::QBbgPortfolioDataResponse::costDate ( int  index) const
virtual

Returns the cost date of the nth security in the portfolio.

If index is out of range or hasCostDate() is false, a null date is returned

virtual double QBbgLib::QBbgPortfolioDataResponse::costFx ( int  index) const
virtual

Returns the cost FX rate of the nth security in the portfolio.

If index is out of range or hasCostFx() is false, 0 returned

virtual bool QBbgLib::QBbgPortfolioDataResponse::hasCost ( ) const
virtual

Checks if result contains the cost of the securities in the portfolio.

virtual bool QBbgLib::QBbgPortfolioDataResponse::hasCostDate ( ) const
virtual

Checks if result contains the cost date of the securities in the portfolio.

virtual bool QBbgLib::QBbgPortfolioDataResponse::hasCostFx ( ) const
virtual

Checks if result contains the cost FX rate of the securities in the portfolio.

virtual bool QBbgLib::QBbgPortfolioDataResponse::hasMarketValue ( ) const
virtual

Checks if result contains the market value of the securities in the portfolio.

virtual bool QBbgLib::QBbgPortfolioDataResponse::hasPosition ( ) const
virtual

Checks if result contains the nominal amount of the securities in the portfolio.

virtual bool QBbgLib::QBbgPortfolioDataResponse::hasWeight ( ) const
virtual

Checks if result contains the relative weight of the securities in the portfolio.

virtual bool QBbgLib::QBbgPortfolioDataResponse::isEmpty ( ) const
virtual
virtual double QBbgLib::QBbgPortfolioDataResponse::marketValue ( int  index) const
virtual

Returns the market value of the nth security in the portfolio.

If index is out of range or hasMarketValue() is false, 0 returned

virtual QBbgPortfolioDataResponse& QBbgLib::QBbgPortfolioDataResponse::operator= ( const QBbgPortfolioDataResponse other)
virtual

Copies another portfolio response.

virtual double QBbgLib::QBbgPortfolioDataResponse::position ( int  index) const
virtual

Returns the nominal amount of the nth security in the portfolio.

If index is out of range or hasPosition() is false, 0 returned

virtual QBbgSecurity QBbgLib::QBbgPortfolioDataResponse::security ( int  index) const
virtual

Returns the nth security in the list.

If index is out of range an invalid security will be returned

virtual int QBbgLib::QBbgPortfolioDataResponse::size ( ) const
virtual

Returns the number of securities in the portfolio.

virtual double QBbgLib::QBbgPortfolioDataResponse::weight ( int  index) const
virtual

Returns the cost relative weight of the nth security in the portfolio.

If index is out of range or hasWeight() is false, 0 returned

Property Documentation

bool QBbgLib::QBbgPortfolioDataResponse::hasCost
read

The result contains the cost of the securities in the portfolio.

Read
hasCost()
bool QBbgLib::QBbgPortfolioDataResponse::hasCostDate
read

The result contains the cost date of the securities in the portfolio.

Read
hasCostDate()
bool QBbgLib::QBbgPortfolioDataResponse::hasCostFx
read

The result contains the cost FX rate of the securities in the portfolio.

Read
hasCostFx()
bool QBbgLib::QBbgPortfolioDataResponse::hasMarketValue
read

The result contains the market value of the securities in the portfolio.

Read
hasMarketValue()
bool QBbgLib::QBbgPortfolioDataResponse::hasPosition
read

The result contains the nominal amount of the securities in the portfolio.

Read
hasPosition()
bool QBbgLib::QBbgPortfolioDataResponse::hasWeight
read

The result contains the relative weight of the securities in the portfolio.

Read
hasWeight()
int QBbgLib::QBbgPortfolioDataResponse::size
read

Number of securities in the portfolio.

Read
size()

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