dxFeed Graal CXX API
Loading...
Searching...
No Matches
dxfcpp::CandleExchange Struct Reference

Exchange attribute of CandleSymbol defines exchange identifier where data is taken from to build the candles. More...

#include <CandleExchange.hpp>

+ Inheritance diagram for dxfcpp::CandleExchange:

Public Member Functions

char getExchangeCode () const noexcept
 Returns exchange code.
 
std::string changeAttributeForSymbol (const std::string &symbol) const noexcept override
 Returns candle event symbol string with this exchange set.
 
std::string toString () const noexcept
 Returns string representation of this exchange.
 

Static Public Member Functions

static CandleExchange valueOf (char exchangeCode) noexcept
 Returns exchange attribute object that corresponds to the specified exchange code character.
 
static CandleExchange getAttributeForSymbol (const std::string &symbol) noexcept
 Returns exchange attribute object of the given candle symbol string.
 

Static Public Attributes

static const CandleExchange COMPOSITE {'\0'}
 Composite exchange where data is taken from all exchanges.
 
static const CandleExchange DEFAULT = COMPOSITE
 Default exchange is CandleExchange::COMPOSITE.
 

Detailed Description

Exchange attribute of CandleSymbol defines exchange identifier where data is taken from to build the candles.

Implementation details

This attribute is encoded in a symbol string with MarketEventSymbols.getExchangeCode and changeExchangeCode methods.

Member Function Documentation

◆ changeAttributeForSymbol()

std::string dxfcpp::CandleExchange::changeAttributeForSymbol ( const std::string & symbol) const
inlineoverridevirtualnoexcept

Returns candle event symbol string with this exchange set.

Parameters
symbolThe original candle event symbol.
Returns
candle event symbol string with this exchange set.

Implements dxfcpp::CandleSymbolAttribute.

◆ getAttributeForSymbol()

static CandleExchange dxfcpp::CandleExchange::getAttributeForSymbol ( const std::string & symbol)
inlinestaticnoexcept

Returns exchange attribute object of the given candle symbol string.

The result is CandleExchange::DEFAULT if the symbol does not have exchange attribute.

Parameters
symbolcandle symbol string.
Returns
exchange attribute object of the given candle symbol string.

◆ getExchangeCode()

char dxfcpp::CandleExchange::getExchangeCode ( ) const
inlinenoexcept

Returns exchange code.

It is ‘’\0'` for CandleExchange::COMPOSITE exchange.

Returns
exchange code.

◆ toString()

std::string dxfcpp::CandleExchange::toString ( ) const
inlinenoexcept

Returns string representation of this exchange.

It is the string "COMPOSITE" for CandleExchange::COMPOSITE exchange or exchange character otherwise.

Returns
string representation of this exchange.

◆ valueOf()

static CandleExchange dxfcpp::CandleExchange::valueOf ( char exchangeCode)
inlinestaticnoexcept

Returns exchange attribute object that corresponds to the specified exchange code character.

Parameters
exchangeCodeThe exchange code character.
Returns
exchange attribute object.