dxFeed Graal CXX API
Loading...
Searching...
No Matches
WildcardSymbol Struct Referencefinal

Represents [wildcard] subscription to all events of the specific event type. More...

#include <WildcardSymbol.hpp>

Public Member Functions

void * toGraal () const noexcept
 Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
 
std::string toString () const noexcept
 Returns string representation of this wildcard subscription symbol.
 

Static Public Member Functions

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

Static Public Attributes

static const std::string RESERVED_PREFIX = "*"
 Symbol prefix that is reserved for wildcard subscriptions.
 
static const WildcardSymbol ALL {RESERVED_PREFIX}
 Represents [wildcard] subscription to all events of the specific event type.
 

Detailed Description

Represents [wildcard] subscription to all events of the specific event type.

The WildcardSymbol::ALL constant can be added to any DXFeedSubscription instance with addSymbols method to the effect of subscribing to all possible event symbols. The corresponding subscription will start receiving all published events of the corresponding types.

Member Function Documentation

◆ freeGraal()

void WildcardSymbol::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.

Referenced by SymbolWrapper::freeGraal().

◆ fromGraal()

const WildcardSymbol & WildcardSymbol::fromGraal ( void * graalNative)
static

Creates an object of the current type and fills it with data from the the dxFeed Graal SDK structure.

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

References ALL.

Referenced by SymbolWrapper::fromGraal().

◆ toGraal()

void * WildcardSymbol::toGraal ( ) const
noexcept

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

◆ toString()

std::string WildcardSymbol::toString ( ) const
inlinenoexcept

Returns string representation of this wildcard subscription symbol.

Returns
string representation of this wildcard subscription symbol.

Member Data Documentation

◆ ALL

const WildcardSymbol WildcardSymbol::ALL {RESERVED_PREFIX}
static

Represents [wildcard] subscription to all events of the specific event type.

NOTE: Wildcard subscription can create extremely high network and CPU load for certain kinds of high-frequency events like quotes. It requires a special arrangement on the side of upstream data provider and is disabled by default in upstream feed configuration. Make that sure you have adequate resources and understand the impact before using it. It can be used for low-frequency events only (like Forex quotes), because each instance of DXFeedSubscription processes events in a single thread and there is no provision to load-balance wildcard subscription amongst multiple threads. Contact your data provider for the corresponding configuration arrangement if needed.

See also
WildcardSymbol

Referenced by fromGraal().

◆ RESERVED_PREFIX

DXFCPP_BEGIN_NAMESPACE const std::string WildcardSymbol::RESERVED_PREFIX = "*"
static

Symbol prefix that is reserved for wildcard subscriptions.

Any subscription starting with "*" is ignored with the exception of WildcardSymbol subscription.