QBbgLib
0.4
Qt wrapper for the Bloomberg API
|
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... | |
QBbgSecurity & | operator= (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... | |
A Bloomberg Security.
This class represents a security.
It includes both the name, the extension and, optionally, the price source and public exchange
Enumeration describing a security extensions.
Represents either a yellow key or an identifier used for the security
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
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
QBbgLib::QBbgSecurity::QBbgSecurity | ( | const QBbgSecurity & | other | ) |
Creates a copy of another security.
|
virtual |
Destructor.
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 |
Converts a string representation to a security extension.
|
static |
Converts a security extension to its string representation.
|
friend |
Write a security into a QDataStream.
|
friend |
Read a security from a QDataStream.
|
related |
Allows QBbgSecurity to be used as a key of a QHash.
|
readwrite |
|
readwrite |
|
readwrite |
|
read |
Check if the security is valid.
|
readwrite |
|
readwrite |