dxFeed Graal CXX API
Loading...
Searching...
No Matches
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 CandleExchange:

Public Member Functions

char getExchangeCode () const noexcept
 Returns exchange code.
 
std::string changeAttributeForSymbol (const dxfcpp::StringLikeWrapper &symbol) const 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 dxfcpp::StringLikeWrapper &symbol)
 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 CandleExchange::changeAttributeForSymbol ( const dxfcpp::StringLikeWrapper & symbol) const
inlineoverridevirtual

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 CandleSymbolAttribute.

◆ getAttributeForSymbol()

static CandleExchange CandleExchange::getAttributeForSymbol ( const dxfcpp::StringLikeWrapper & symbol)
inlinestatic

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.

References MarketEventSymbols::getExchangeCode(), and valueOf().

◆ getExchangeCode()

char CandleExchange::getExchangeCode ( ) const
inlinenoexcept

Returns exchange code.

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

Returns
exchange code.

◆ toString()

std::string 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 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.

References COMPOSITE.

Referenced by getAttributeForSymbol().