![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
The market segment an instrument is listed on, such as KOSPI or NASDAQ. More...
#include <algotradelib/src/core/instrument.hpp>
Public Types | |
| enum class | Known { UNKNOWN , KOSPI , KOSDAQ , NYSE , NASDAQ , AMEX } |
| The segments the library recognizes. More... | |
Public Member Functions | |
| std::string | str () const |
| Returns the segment's name for display. | |
Public Attributes | |
| Known | known_ {Known::UNKNOWN} |
| The segment, or UNKNOWN if the broker's code was not recognized. | |
| Code< 12 > | other_ |
| The broker's code, when known_ is UNKNOWN and the code fits Code<12>. | |
Friends | |
| bool | operator== (const MarketSegment &lhs, const MarketSegment &rhs) |
| Compares the normalized segment and the preserved code. | |
| bool | operator!= (const MarketSegment &lhs, const MarketSegment &rhs) |
| Compares two segments for inequality. | |
The market segment an instrument is listed on, such as KOSPI or NASDAQ.
A code the library does not recognize is kept in other_ when Code<12> can hold it.
Definition at line 18 of file instrument.hpp.
|
strong |
The segments the library recognizes.
Definition at line 20 of file instrument.hpp.
|
inline |
Returns the segment's name for display.
Definition at line 43 of file instrument.hpp.
|
friend |
Compares two segments for inequality.
| lhs | The first segment. |
| rhs | The second segment. |
Definition at line 77 of file instrument.hpp.
|
friend |
Compares the normalized segment and the preserved code.
| lhs | The first segment. |
| rhs | The second segment. |
Definition at line 67 of file instrument.hpp.
| Known algotradelib::MarketSegment::known_ {Known::UNKNOWN} |
The segment, or UNKNOWN if the broker's code was not recognized.
Definition at line 30 of file instrument.hpp.
Referenced by algotradelib::market_segment(), operator==, and str().
| Code<12> algotradelib::MarketSegment::other_ |
The broker's code, when known_ is UNKNOWN and the code fits Code<12>.
Empty beside UNKNOWN means the broker named no segment, or named one too long or with characters Code cannot hold.
Definition at line 37 of file instrument.hpp.
Referenced by algotradelib::market_segment(), operator==, and str().