|
dxFeed Graal CXX API v5.0.0
|
A wrapper class for Classification of Financial Instruments code as defined in ISO 10962 standard. More...
#include <CFI.hpp>
Inheritance diagram for CFI:Classes | |
| struct | Attribute |
| Describes a single attribute with all values as defined in the ISO 10962 standard. More... | |
| struct | Value |
| Describes single value of single character of CFI code as defined in the ISO 10962 standard. More... | |
Public Types | |
| using | Ptr = std::shared_ptr<CFI> |
| The alias to a type of shared pointer to the CFI object. | |
| using | Unique = std::unique_ptr<CFI> |
| The alias to a type of unique pointer to the CFI object. | |
Public Types inherited from SharedEntity | |
| using | Ptr = std::shared_ptr<SharedEntity> |
| The alias to a type of shared pointer to the SharedEntity object. | |
Public Member Functions | |
| std::string | getCode () const |
| Returns CFI code. | |
| std::int32_t | getIntCode () const |
| Returns integer representation of CFI code. | |
| std::int16_t | getCategory () const |
| Returns a single UTF16 character for the instrument category - the first character of the CFI code. | |
| char | getCategoryChar () const |
| Returns a single ASCII character for the instrument category - the first character of the CFI code. | |
| std::int16_t | getGroup () const |
| Returns a single UTF16 character for the instrument group - the second character of the CFI code. | |
| char | getGroupChar () const |
| Returns a single ASCII character for the instrument group - the second character of the CFI code. | |
| bool | isEquity () const |
Returns true if the corresponding instrument is an equity. | |
| bool | isDebtInstrument () const |
Returns true if the corresponding instrument is a debt instrument. | |
| bool | isEntitlement () const |
Returns true if the corresponding instrument is an entitlement (right). | |
| bool | isOption () const |
Returns true if the corresponding instrument is an option. | |
| bool | isFuture () const |
Returns true if the corresponding instrument is a future. | |
| bool | isOther () const |
Returns true if the corresponding instrument is an "other" (miscellaneous) instrument. | |
| std::vector< std::shared_ptr< Value > > | decipher () const |
| Returns container of values that explain the meaning of each character in the CFI code. | |
| std::string | describe () const |
| Returns a short textual description of this CFI code by listing names of all values for the characters in this CFI code. | |
| bool | operator== (const CFI &other) const |
Returns true if this object is equal to other object. | |
| bool | operator== (const CFI::Ptr &other) const |
Returns true if this object is equal to other object. | |
| std::size_t | hashCode () const noexcept |
| std::string | toString () const override |
| Returns a string representation of the current object. | |
Public Member Functions inherited from SharedEntity | |
| template<typename T> | |
| bool | is () const noexcept |
| Checks that the pointer to the current type could be converted to type T* In other words: whether type T belongs to the type hierarchy in which the current type resides. | |
| template<typename T> | |
| std::shared_ptr< T > | sharedAs () noexcept |
| Returns a pointer to the current object wrapped in a smart pointer to type T. | |
| template<typename T> | |
| std::shared_ptr< T > | sharedAs () const noexcept |
| Returns a pointer to the current object wrapped in a smart pointer to type T. | |
Public Member Functions inherited from Entity | |
| virtual | ~Entity () noexcept=default |
| The default virtual d-tor. | |
Static Public Member Functions | |
| static Ptr | valueOf (const StringLike &code) |
| Returns an instance of CFI for specified CFI code. | |
| static Ptr | valueOf (std::int32_t intCode) |
| Returns an instance of CFI for a specified integer representation of CFI code. | |
Static Public Member Functions inherited from RequireMakeShared< CFI > | |
| static auto | createShared (Args &&...args) |
| Creates a smart pointer to an object. | |
Static Public Attributes | |
| static const Ptr | EMPTY |
| Empty CFI - it has code "XXXXXX". | |
A wrapper class for Classification of Financial Instruments code as defined in ISO 10962 standard.
Main purpose is to provide code validity checks and to construct textual explanation of CFI code as defined in the standard via API. This class does not provide API-accessible constants for specific instrument attributes and values.
| std::vector< std::shared_ptr< CFI::Value > > CFI::decipher | ( | ) | const |
Returns container of values that explain the meaning of each character in the CFI code.
Array always has a length of 6, and each value explains a corresponding character. If a certain character is unapplicable, unknown or unrecognized - corresponding value will contain reference to this fact.
| std::string CFI::describe | ( | ) | const |
Returns a short textual description of this CFI code by listing names of all values for the characters in this CFI code.
See also the CFI::decipher () method.
| std::int16_t CFI::getCategory | ( | ) | const |
Returns a single UTF16 character for the instrument category - the first character of the CFI code.
Referenced by getCategoryChar().
| char CFI::getCategoryChar | ( | ) | const |
Returns a single ASCII character for the instrument category - the first character of the CFI code.
References getCategory().
| std::string CFI::getCode | ( | ) | const |
| std::int16_t CFI::getGroup | ( | ) | const |
Returns a single UTF16 character for the instrument group - the second character of the CFI code.
Referenced by getGroupChar().
| char CFI::getGroupChar | ( | ) | const |
Returns a single ASCII character for the instrument group - the second character of the CFI code.
References getGroup().
| std::int32_t CFI::getIntCode | ( | ) | const |
|
noexcept |
| bool CFI::isDebtInstrument | ( | ) | const |
Returns true if the corresponding instrument is a debt instrument.
true if the corresponding instrument is a debt instrument. | bool CFI::isEntitlement | ( | ) | const |
Returns true if the corresponding instrument is an entitlement (right).
true if the corresponding instrument is an entitlement (right). | bool CFI::isEquity | ( | ) | const |
Returns true if the corresponding instrument is an equity.
true if the corresponding instrument is an equity. | bool CFI::isFuture | ( | ) | const |
Returns true if the corresponding instrument is a future.
true if the corresponding instrument is a future. | bool CFI::isOption | ( | ) | const |
Returns true if the corresponding instrument is an option.
true if the corresponding instrument is an option. | bool CFI::isOther | ( | ) | const |
Returns true if the corresponding instrument is an "other" (miscellaneous) instrument.
true if the corresponding instrument is an "other" (miscellaneous) instrument. | bool CFI::operator== | ( | const CFI & | other | ) | const |
Returns true if this object is equal to other object.
| other | Another object |
true if this object is equal to other object
|
inline |
Returns true if this object is equal to other object.
| other | Another object |
true if this object is equal to other object
|
overridevirtual |
Returns a string representation of the current object.
Reimplemented from SharedEntity.
|
static |
Returns an instance of CFI for specified CFI code.
Accepts short code and expands it to 6 letters by appending "X" at the end.
| code | The CFI code. |
| JavaException("IllegalArgumentException") | if the code is invalid. |