dxFeed Graal CXX API
Loading...
Searching...
No Matches
IndexedEventSubscriptionSymbol Class Reference

Represents subscription to a specific source of indexed events. More...

#include <IndexedEventSubscriptionSymbol.hpp>

+ Inheritance diagram for IndexedEventSubscriptionSymbol:

Public Member Functions

 IndexedEventSubscriptionSymbol (const SymbolWrapper &eventSymbol, const IndexedEventSource &source)
 Creates indexed event subscription symbol with a specified event symbol and source.
 
virtual const std::unique_ptr< SymbolWrapper > & getEventSymbol () const
 Returns the wrapped event symbol (CandleSymbol, WildcardSymbol, etc).
 
virtual const IndexedEventSourcegetSource () const
 Returns indexed event source.
 
virtual std::string toString () const noexcept
 Returns string representation of this indexed event subscription symbol.
 

Protected Member Functions

virtual void * toGraal () const
 Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
 

Static Protected Member Functions

static void freeGraal (void *graalNative)
 Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
 
static IndexedEventSubscriptionSymbol fromGraal (void *graalNative)
 Creates an object of the current type and fills it with data from the the dxFeed Graal SDK structure (recursively if necessary).
 

Detailed Description

Represents subscription to a specific source of indexed events.

This is symbol is observed by ObservableSubscriptionChangeListener methods symbolsAdded and symbolsRemoved when subscription to IndexedEvent is defined.

Instances of this class can be used with DXFeedSubscription to specify subscription to a particular source of indexed events. By default, when subscribing to indexed events by their event symbol object, the subscription is performed to all supported sources.

Equality and hash codes

Indexed event subscription symbols are compared based on their eventSymbol and source.

Constructor & Destructor Documentation

◆ IndexedEventSubscriptionSymbol()

DXFCPP_BEGIN_NAMESPACE IndexedEventSubscriptionSymbol::IndexedEventSubscriptionSymbol ( const SymbolWrapper & eventSymbol,
const IndexedEventSource & source )

Creates indexed event subscription symbol with a specified event symbol and source.

Parameters
eventSymbolthe wrapped event symbol (CandleSymbol, WildcardSymbol, etc).
sourcethe source.

References IndexedEventSubscriptionSymbol().

Referenced by IndexedEventSubscriptionSymbol().

Member Function Documentation

◆ freeGraal()

void IndexedEventSubscriptionSymbol::freeGraal ( void * graalNative)
staticprotected

Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).

Parameters
graalNativeThe pointer to the dxFeed Graal SDK structure.

References IndexedEventSource::freeGraal(), and SymbolWrapper::freeGraal().

Referenced by SymbolWrapper::freeGraal().

◆ fromGraal()

IndexedEventSubscriptionSymbol IndexedEventSubscriptionSymbol::fromGraal ( void * graalNative)
staticprotected

Creates an object of the current type and fills it with data from the the dxFeed Graal SDK structure (recursively if necessary).

Parameters
graalNativeThe pointer to the dxFeed Graal SDK structure.
Returns
The object of current type.
Exceptions
std::invalid_argument

References IndexedEventSource::fromGraal(), and SymbolWrapper::fromGraal().

Referenced by SymbolWrapper::fromGraal().

◆ getEventSymbol()

const std::unique_ptr< SymbolWrapper > & IndexedEventSubscriptionSymbol::getEventSymbol ( ) const
virtual

Returns the wrapped event symbol (CandleSymbol, WildcardSymbol, etc).

Returns
the wrapped event symbol.

◆ getSource()

const IndexedEventSource & IndexedEventSubscriptionSymbol::getSource ( ) const
virtual

Returns indexed event source.

Returns
indexed event source.

◆ toGraal()

void * IndexedEventSubscriptionSymbol::toGraal ( ) const
protectedvirtual

Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).

Fills the dxFeed Graal SDK structure's fields by the data of the current entity (recursively if necessary). Returns the pointer to the filled structure.

Returns
The pointer to the filled dxFeed Graal SDK structure

Reimplemented in TimeSeriesSubscriptionSymbol.

◆ toString()

std::string IndexedEventSubscriptionSymbol::toString ( ) const
virtualnoexcept

Returns string representation of this indexed event subscription symbol.

Returns
string representation of this indexed event subscription symbol.

Reimplemented in TimeSeriesSubscriptionSymbol.