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

A Bloomberg Security. More...

#include <QBbgSecurity.h>

Public Types

enum  YellowKeys {
  Invalid = -1, Govt, Corp, Mtge,
  MMkt, Muni, Pfd, Equity,
  Comdty, Index, Curncy, Client,
  cusip = FirstPrefix, wpk, isin, buid,
  sedol1, sedol2, sicovam, common,
  bsid, svm, cins, cats,
  bbgid
}
 Enumeration describing a security extensions. More...
 

Public Member Functions

 QBbgSecurity ()
 
 QBbgSecurity (const QString &SecString)
 Creates a security based on its string representation. More...
 
 QBbgSecurity (const QString &SecName, YellowKeys SecKey)
 Creates a security based on its name and a security extension. More...
 
 QBbgSecurity (const QBbgSecurity &other)
 Creates a copy of another security. More...
 
virtual ~QBbgSecurity ()
 Destructor. More...
 
const QString & exchange () const
 The public exchange for the security. More...
 
YellowKeys extension () const
 The security Extension. More...
 
QString fullName () const
 Returns the fully decorated security name including price source, exchange and extension. More...
 
bool isValid () const
 Check if the security is valid. More...
 
const QString & name () const
 The security Name. More...
 
bool operator!= (const QBbgSecurity &other) const
 Check if two securities are different. More...
 
QBbgSecurityoperator= (const QBbgSecurity &other)
 Copy another security. More...
 
bool operator== (const QBbgSecurity &other) const
 Check if two securities are the same. More...
 
const QString & pricingSource () const
 The price source to use. More...
 
void setExchange (const QString &val)
 Set the public exchange for the security. More...
 
void setExtension (YellowKeys val)
 Set the security Extension. More...
 
void setFullName (QString val)
 Extract the security from the decorated name. More...
 
void setName (const QString &val)
 Set the security name. More...
 
void setPricingSource (const QString &val)
 Set the price source to use. More...
 

Static Public Member Functions

static YellowKeys stringToYellowKey (QString a)
 Converts a string representation to a security extension. More...
 
static QString yellowKeyToString (YellowKeys a)
 Converts a security extension to its string representation. More...
 

Properties

QString exchange
 The public exchange for the security. More...
 
YellowKeys extension
 The yellow key or identifier code for the security. More...
 
QString fullName
 The fully decorated name of the security. More...
 
bool isValid
 Check if the security is valid. More...
 
QString name
 The name or identifier of the security. More...
 
QString pricingSource
 The price source to use. More...
 

Friends

QDataStream & operator<< (QDataStream &stream, const QBbgSecurity &obj)
 Write a security into a QDataStream. More...
 
QDataStream & operator>> (QDataStream &stream, QBbgSecurity &obj)
 Read a security from a QDataStream. More...
 

Related Functions

(Note that these are not member functions.)

uint qHash (const QBbgLib::QBbgSecurity &key, uint seed)
 Allows QBbgSecurity to be used as a key of a QHash. More...
 

Detailed Description

A Bloomberg Security.

This class represents a security.
It includes both the name, the extension and, optionally, the price source and public exchange

Member Enumeration Documentation

Enumeration describing a security extensions.

Represents either a yellow key or an identifier used for the security

Enumerator
Govt 

Government Bond

Corp 

Corporate Bond

Mtge 

Asset Backed Security

MMkt 

Money Market

Muni 

Municipal Bond

Pfd 

Preferred

Equity 

Equity

Comdty 

Commodity

Index 

Index

Curncy 

Currency

Client 

Portfolio

cusip 

CUSIP code

wpk 

Wertpapier Kenn-Nummer

isin 

ISIN code

buid 

Unique Bloomberg identifier

sedol1 

SEDOL code

sedol2 

SEDOL code

sicovam 

SICOVAM code

common 

EUROCLEAR common code

bsid 

Bloomberg identifier

svm 

SVM number

cins 

CINS number

cats 

Certificates Of Accrual On Treasury Securities

bbgid 

unique global Bloomberg identifies

Constructor & Destructor Documentation

QBbgLib::QBbgSecurity::QBbgSecurity ( )

Creates a null security

QBbgLib::QBbgSecurity::QBbgSecurity ( const QString &  SecString)

Creates a security based on its string representation.

If the input is invalid, a null security will be created

  • SecString Examples of valid strings are IBM US Equity , /isin/XS1372839214
QBbgLib::QBbgSecurity::QBbgSecurity ( const QString &  SecName,
YellowKeys  SecKey 
)

Creates a security based on its name and a security extension.

If the input is invalid, a null security will be created

  • SecName The security name without extension
  • SecKey The security extension to use
QBbgLib::QBbgSecurity::QBbgSecurity ( const QBbgSecurity other)

Creates a copy of another security.

virtual QBbgLib::QBbgSecurity::~QBbgSecurity ( )
virtual

Destructor.

Member Function Documentation

const QString& QBbgLib::QBbgSecurity::exchange ( ) const

The public exchange for the security.

YellowKeys QBbgLib::QBbgSecurity::extension ( ) const

The security Extension.

QString QBbgLib::QBbgSecurity::fullName ( ) const

Returns the fully decorated security name including price source, exchange and extension.

bool QBbgLib::QBbgSecurity::isValid ( ) const

Check if the security is valid.

const QString& QBbgLib::QBbgSecurity::name ( ) const

The security Name.

bool QBbgLib::QBbgSecurity::operator!= ( const QBbgSecurity other) const

Check if two securities are different.

QBbgSecurity& QBbgLib::QBbgSecurity::operator= ( const QBbgSecurity other)

Copy another security.

bool QBbgLib::QBbgSecurity::operator== ( const QBbgSecurity other) const

Check if two securities are the same.

const QString& QBbgLib::QBbgSecurity::pricingSource ( ) const

The price source to use.

void QBbgLib::QBbgSecurity::setExchange ( const QString &  val)

Set the public exchange for the security.

void QBbgLib::QBbgSecurity::setExtension ( YellowKeys  val)

Set the security Extension.

void QBbgLib::QBbgSecurity::setFullName ( QString  val)

Extract the security from the decorated name.

void QBbgLib::QBbgSecurity::setName ( const QString &  val)

Set the security name.

void QBbgLib::QBbgSecurity::setPricingSource ( const QString &  val)

Set the price source to use.

static YellowKeys QBbgLib::QBbgSecurity::stringToYellowKey ( QString  a)
static

Converts a string representation to a security extension.

static QString QBbgLib::QBbgSecurity::yellowKeyToString ( YellowKeys  a)
static

Converts a security extension to its string representation.

Friends And Related Function Documentation

QDataStream& operator<< ( QDataStream &  stream,
const QBbgSecurity obj 
)
friend

Write a security into a QDataStream.

QDataStream& operator>> ( QDataStream &  stream,
QBbgSecurity obj 
)
friend

Read a security from a QDataStream.

uint qHash ( const QBbgLib::QBbgSecurity key,
uint  seed 
)
related

Allows QBbgSecurity to be used as a key of a QHash.

Property Documentation

QString QBbgLib::QBbgSecurity::exchange
readwrite

The public exchange for the security.

Read
exchange()
Write
setExchange()
YellowKeys QBbgLib::QBbgSecurity::extension
readwrite

The yellow key or identifier code for the security.

Read
extension()
Write
setExtension()
QString QBbgLib::QBbgSecurity::fullName
readwrite

The fully decorated name of the security.

Read
fullName()
Write
setFullName()
bool QBbgLib::QBbgSecurity::isValid
read

Check if the security is valid.

Read
isValid()
QString QBbgLib::QBbgSecurity::name
readwrite

The name or identifier of the security.

Read
name()
Write
setName()
QString QBbgLib::QBbgSecurity::pricingSource
readwrite

The price source to use.

Read
pricingSource()
Write
setPricingSource()

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