dxFeed Graal CXX API
Loading...
Searching...
No Matches
dxfcpp::IndexedEvent Struct Referenceabstract

Represents an indexed collection of up-to-date information about some condition or state of an external entity that updates in real-time. More...

#include <IndexedEvent.hpp>

+ Inheritance diagram for dxfcpp::IndexedEvent:

Public Types

using Ptr = std::shared_ptr<IndexedEvent>
 The alias to a type of shared pointer to the IndexedEvent object.
 

Public Member Functions

virtual const IndexedEventSourcegetSource () const &noexcept=0
 Returns the source of this event.
 
virtual std::int32_t getEventFlags () const noexcept=0
 Returns transactional event flags.
 
virtual EventFlagsMask getEventFlagsMask () const noexcept=0
 Returns transactional event flags.
 
virtual void setEventFlags (std::int32_t eventFlags) noexcept=0
 Changes transactional event flags.
 
virtual void setEventFlags (const EventFlagsMask &eventFlags) noexcept=0
 Changes transactional event flags.
 
virtual std::int64_t getIndex () const noexcept=0
 Returns unique per-symbol index of this event.
 
virtual void setIndex (std::int64_t index) noexcept=0
 Changes unique per-symbol index of this event.
 

Static Public Attributes

static const EventFlag TX_PENDING = EventFlag::TX_PENDING
 0x01 - A bitmask to get transaction pending indicator from the value of eventFlags property.
 
static const EventFlag REMOVE_EVENT = EventFlag::REMOVE_EVENT
 0x02 - A bitmask to get removal indicator from the value of eventFlags property.
 
static const EventFlag SNAPSHOT_BEGIN = EventFlag::SNAPSHOT_BEGIN
 0x04 - A bitmask to get snapshot begin indicator from the value of eventFlags property.
 
static const EventFlag SNAPSHOT_END = EventFlag::SNAPSHOT_END
 0x08 - A bitmask to get snapshot end indicator from the value of eventFlags property.
 
static const EventFlag SNAPSHOT_SNIP = EventFlag::SNAPSHOT_SNIP
 0x10 - A bitmask to get snapshot snip indicator from the value of eventFlags property.
 
static const EventFlag SNAPSHOT_MODE = EventFlag::SNAPSHOT_MODE
 0x40 - A bitmask to set snapshot mode indicator into the value of eventFlags property.
 

Detailed Description

Represents an indexed collection of up-to-date information about some condition or state of an external entity that updates in real-time.

For example, ::Order represents an order to buy or to sell some market instrument that is currently active on a market exchange and multiple orders are active for each symbol at any given moment in time. ::Candle represent snapshots of aggregate information about trading over a specific time period and there are multiple periods available. The ::Candle is also an example of ::TimeSeriesEvent that is a more specific event type.

Index for each event is available via index property. Indexed events retain information about multiple events per symbol based on the event index and are conflated based on the event index. Last indexed event for each symbol and index is always delivered to event listeners on subscription, but intermediate (next-to-last) events for each symbol+index pair are not queued anywhere, they are simply discarded as stale events. More recent events represent an up-to-date information about some external entity.

Some indexed events, like ::Order, support multiple sources of information for the same symbol. The event source is available via source property. The value of source property is always DEFAULT for time-series events and other singe-sourced events like ::Series, that do not support this feature.

See also the "Event Flags" section

Member Function Documentation

◆ getEventFlags()

virtual std::int32_t dxfcpp::IndexedEvent::getEventFlags ( ) const
pure virtualnoexcept

Returns transactional event flags.

See EventFlag "Event Flags" section.

Returns
The transactional event flags.

Implemented in dxfcpp::Candle, dxfcpp::OptionSale, dxfcpp::OrderBase, dxfcpp::TimeAndSale, dxfcpp::Greeks, dxfcpp::Series, dxfcpp::TheoPrice, and dxfcpp::Underlying.

◆ getEventFlagsMask()

virtual EventFlagsMask dxfcpp::IndexedEvent::getEventFlagsMask ( ) const
pure virtualnoexcept

Returns transactional event flags.

See EventFlag "Event Flags" section.

Returns
The transactional event flags' mask.

Implemented in dxfcpp::Candle, dxfcpp::OptionSale, dxfcpp::OrderBase, dxfcpp::TimeAndSale, dxfcpp::Greeks, dxfcpp::Series, dxfcpp::TheoPrice, and dxfcpp::Underlying.

◆ getIndex()

virtual std::int64_t dxfcpp::IndexedEvent::getIndex ( ) const
pure virtualnoexcept

Returns unique per-symbol index of this event.

Returns
unique per-symbol index of this event.

Implemented in dxfcpp::Candle, dxfcpp::OptionSale, dxfcpp::OrderBase, dxfcpp::TimeAndSale, dxfcpp::Greeks, dxfcpp::Series, dxfcpp::TheoPrice, dxfcpp::Underlying, and dxfcpp::TimeSeriesEvent.

◆ getSource()

virtual const IndexedEventSource & dxfcpp::IndexedEvent::getSource ( ) const &
pure virtualnoexcept

Returns the source of this event.

Returns
The source of this event.

Implemented in dxfcpp::OptionSale, dxfcpp::OrderBase, dxfcpp::TimeAndSale, dxfcpp::Greeks, dxfcpp::Series, dxfcpp::TheoPrice, dxfcpp::Underlying, and dxfcpp::TimeSeriesEvent.

◆ setEventFlags() [1/2]

virtual void dxfcpp::IndexedEvent::setEventFlags ( const EventFlagsMask & eventFlags)
pure virtualnoexcept

Changes transactional event flags.

See EventFlag "Event Flags" section.

Parameters
eventFlagstransactional event flags' mask.

Implemented in dxfcpp::Candle, dxfcpp::OptionSale, dxfcpp::OrderBase, dxfcpp::TimeAndSale, dxfcpp::Greeks, dxfcpp::Series, dxfcpp::TheoPrice, and dxfcpp::Underlying.

◆ setEventFlags() [2/2]

virtual void dxfcpp::IndexedEvent::setEventFlags ( std::int32_t eventFlags)
pure virtualnoexcept

Changes transactional event flags.

See EventFlag "Event Flags" section.

Parameters
eventFlagstransactional event flags.

Implemented in dxfcpp::Candle, dxfcpp::OptionSale, dxfcpp::OrderBase, dxfcpp::TimeAndSale, dxfcpp::Greeks, dxfcpp::Series, dxfcpp::TheoPrice, and dxfcpp::Underlying.

◆ setIndex()

virtual void dxfcpp::IndexedEvent::setIndex ( std::int64_t index)
pure virtualnoexcept

Changes unique per-symbol index of this event.

Parameters
indexunique per-symbol index of this event.

Implemented in dxfcpp::Candle, dxfcpp::OptionSale, dxfcpp::OrderBase, dxfcpp::TimeAndSale, dxfcpp::Greeks, dxfcpp::Series, dxfcpp::TheoPrice, and dxfcpp::Underlying.

Member Data Documentation

◆ REMOVE_EVENT

const EventFlag dxfcpp::IndexedEvent::REMOVE_EVENT = EventFlag::REMOVE_EVENT
static

0x02 - A bitmask to get removal indicator from the value of eventFlags property.

bool removeEvent = (event-> getEventFlags() & IndexedEvent::REMOVE_EVENT) != 0;
virtual std::int32_t getEventFlags() const noexcept=0
Returns transactional event flags.
static const EventFlag REMOVE_EVENT
0x02 - A bitmask to get removal indicator from the value of eventFlags property.
Definition IndexedEvent.hpp:47

See "Event Flags" section

◆ SNAPSHOT_BEGIN

const EventFlag dxfcpp::IndexedEvent::SNAPSHOT_BEGIN = EventFlag::SNAPSHOT_BEGIN
static

0x04 - A bitmask to get snapshot begin indicator from the value of eventFlags property.

bool snapshotBegin = (event-> getEventFlags() & IndexedEvent::SNAPSHOT_BEGIN) != 0;
static const EventFlag SNAPSHOT_BEGIN
0x04 - A bitmask to get snapshot begin indicator from the value of eventFlags property.
Definition IndexedEvent.hpp:50

See "Event Flags" section

◆ SNAPSHOT_END

const EventFlag dxfcpp::IndexedEvent::SNAPSHOT_END = EventFlag::SNAPSHOT_END
static

0x08 - A bitmask to get snapshot end indicator from the value of eventFlags property.

bool snapshotEnd = (event-> getEventFlags() & IndexedEvent::SNAPSHOT_END) != 0;
static const EventFlag SNAPSHOT_END
0x08 - A bitmask to get snapshot end indicator from the value of eventFlags property.
Definition IndexedEvent.hpp:53

See "Event Flags" section

◆ SNAPSHOT_MODE

const EventFlag dxfcpp::IndexedEvent::SNAPSHOT_MODE = EventFlag::SNAPSHOT_MODE
static

0x40 - A bitmask to set snapshot mode indicator into the value of eventFlags property.

This flag is intended for publishing only.

See "Event Flags" section

◆ SNAPSHOT_SNIP

const EventFlag dxfcpp::IndexedEvent::SNAPSHOT_SNIP = EventFlag::SNAPSHOT_SNIP
static

0x10 - A bitmask to get snapshot snip indicator from the value of eventFlags property.

bool snapshotSnip = (event-> getEventFlags() & IndexedEvent::SNAPSHOT_SNIP) != 0;
static const EventFlag SNAPSHOT_SNIP
0x10 - A bitmask to get snapshot snip indicator from the value of eventFlags property.
Definition IndexedEvent.hpp:56

See "Event Flags" section

◆ TX_PENDING

const EventFlag dxfcpp::IndexedEvent::TX_PENDING = EventFlag::TX_PENDING
static

0x01 - A bitmask to get transaction pending indicator from the value of eventFlags property.

bool txPending = (event-> getEventFlags() & IndexedEvent::TX_PENDING) != 0;
static const EventFlag TX_PENDING
0x01 - A bitmask to get transaction pending indicator from the value of eventFlags property.
Definition IndexedEvent.hpp:44

See "Event Flags" section