dxFeed Graal CXX API
Loading...
Searching...
No Matches
TimeSeriesSubscriptionSymbol Class Referencefinal

Represents subscription to time-series of events. More...

#include <TimeSeriesSubscriptionSymbol.hpp>

+ Inheritance diagram for TimeSeriesSubscriptionSymbol:

Public Member Functions

 TimeSeriesSubscriptionSymbol (const SymbolWrapper &eventSymbol, std::int64_t fromTime)
 Creates time-series subscription symbol with a specified event symbol and subscription time.
 
std::int64_t getFromTime () const
 Returns the subscription time.
 
void * toGraal () const override
 Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
 
std::string toString () const noexcept override
 Returns string representation of this time-series subscription symbol.
 
- Public Member Functions inherited from IndexedEventSubscriptionSymbol
 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.
 

Static Public Member Functions

static void freeGraal (void *graalNative)
 Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
 
static TimeSeriesSubscriptionSymbol 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).
 

Additional Inherited Members

- Static Protected Member Functions inherited from IndexedEventSubscriptionSymbol
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 time-series of events.

This is symbol is observed by ObservableSubscriptionChangeListener methods symbolsAdded and symbolsRemoved when time-series subscription is created via DXFeedTimeSeriesSubscription class.

Instances of this class can be used with DXFeedSubscription to specify subscription for time series events from a specific time. By default, subscribing to time-series events by their event symbol object, the subscription is performed to a stream of new events as they happen only.

TimeSeriesEvent represents a special subtype of IndexedEvent. The source identifier of a time-series event is always zero and thus

Equality and hash codes

This is a FilteredSubscriptionSymbol. Time-series subscription symbols are compared based on their eventSymbol only. It means, that a set of time-series subscription symbols can contain at most one time-series subscription for each event symbol.

Constructor & Destructor Documentation

◆ TimeSeriesSubscriptionSymbol()

TimeSeriesSubscriptionSymbol::TimeSeriesSubscriptionSymbol ( const SymbolWrapper & eventSymbol,
std::int64_t fromTime )

Creates time-series subscription symbol with a specified event symbol and subscription time.

Parameters
eventSymbolthe wrapped event symbol (CandleSymbol, WildcardSymbol, etc).
fromTimethe subscription time.

Member Function Documentation

◆ freeGraal()

void TimeSeriesSubscriptionSymbol::freeGraal ( void * graalNative)
static

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

Parameters
graalNativeThe pointer to the dxFeed Graal SDK structure.

References SymbolWrapper::freeGraal().

Referenced by SymbolWrapper::freeGraal().

◆ fromGraal()

TimeSeriesSubscriptionSymbol TimeSeriesSubscriptionSymbol::fromGraal ( void * graalNative)
static

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 SymbolWrapper::fromGraal().

Referenced by SymbolWrapper::fromGraal().

◆ getFromTime()

int64_t TimeSeriesSubscriptionSymbol::getFromTime ( ) const

Returns the subscription time.

Returns
the subscription time.

◆ toGraal()

void * TimeSeriesSubscriptionSymbol::toGraal ( ) const
overridevirtual

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 from IndexedEventSubscriptionSymbol.

◆ toString()

std::string TimeSeriesSubscriptionSymbol::toString ( ) const
overridevirtualnoexcept

Returns string representation of this time-series subscription symbol.

Returns
string representation of this time-series subscription symbol.

Reimplemented from IndexedEventSubscriptionSymbol.