dxFeed Graal CXX API v5.0.0
Loading...
Searching...
No Matches
Strings.hpp
1// Copyright (c) 2025 Devexperts LLC.
2// SPDX-License-Identifier: MPL-2.0
3
4#pragma once
5
6#include "../Conf.hpp"
7
9
11
12namespace internal::resources {
13
14struct Strings {
15 struct Events {
16 static constexpr auto UNABLE_TO_CREATE = "Unable to create {}. The `{}` parameter is nullptr";
17 static constexpr auto UNABLE_TO_CREATE2 = "Unable to create {}. Wrong event class {}({})! Expected: {}";
18 static constexpr auto UNABLE_TO_FREE = "Unable to free {}'s Graal data. Wrong event class {}({})! Expected: {}";
19 static constexpr auto INVALID_VALUE_FOR_ARG = "Invalid value for argument `{}`: {}";
20 static constexpr auto UNKNOWN_CANDLE_ = "Unknown candle {}: {}";
21 static constexpr auto MISSING_CANDLE_ = "Missing candle {}";
22 };
23};
24
25} // namespace internal::resources
26
27namespace ires = internal::resources;
28
30
#define DXFCXX_DISABLE_MSC_WARNINGS_POP()
Definition Conf.hpp:31
#define DXFCPP_END_NAMESPACE
Definition Conf.hpp:97
#define DXFCPP_BEGIN_NAMESPACE
Definition Conf.hpp:94
#define DXFCXX_DISABLE_MSC_WARNINGS_PUSH(warnings)
Definition Conf.hpp:30
void setSequence(std::int32_t sequence)
Changes sequence number of this event.
Definition Candle.cpp:251
Candle & withBidVolume(double bidVolume) noexcept
Changes bid volume in this candle.
Definition Candle.cpp:374
double getImpVolatility() const noexcept
Returns the implied volatility.
Definition Candle.cpp:394
void setClose(double close) noexcept
Changes the last (close) price of this candle.
Definition Candle.cpp:328
Candle & withSequence(std::int32_t sequence) noexcept
Changes sequence number of this event.
Definition Candle.cpp:262
void setTime(std::int64_t time) noexcept
Changes the timestamp of the event in milliseconds.
Definition Candle.cpp:235
void setBidVolume(double bidVolume) noexcept
Changes bid volume in this candle.
Definition Candle.cpp:370
void setEventFlags(std::int32_t eventFlags) noexcept override
Changes transactional event flags.
Definition Candle.cpp:193
static Ptr fromGraal(void *graalNative)
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
Definition Candle.cpp:84
void assign(std::shared_ptr< EventType > event) override
Replaces the contents of the event.
Definition Candle.cpp:117
void setImpVolatility(double impVolatility)
Changes implied volatility.
Definition Candle.cpp:398
Candle & withOpen(double open) noexcept
Changes the first (open) price of this candle.
Definition Candle.cpp:290
Candle & withHigh(double high) noexcept
Changes the maximal (high) price of this candle.
Definition Candle.cpp:304
Candle & withCount(std::int64_t count) noexcept
Changes total number of original trade (or quote) events in this candle.
Definition Candle.cpp:276
Candle & withAskVolume(double askVolume) noexcept
Changes ask volume in this candle.
Definition Candle.cpp:388
double getAskVolume() const noexcept
Returns ask volume in this candle.
Definition Candle.cpp:380
std::int64_t getTime() const noexcept override
Returns the timestamp of the event in milliseconds.
Definition Candle.cpp:229
Candle(CandleSymbol eventSymbol) noexcept
Creates a new candle with the specified candle event symbol.
Definition Candle.cpp:144
void setEventSymbol(const CandleSymbol &eventSymbol) noexcept override
Changes the event symbol that identifies this event type in subscription.
Definition Candle.cpp:159
void setOpen(double open) noexcept
Changes the first (open) price of this candle.
Definition Candle.cpp:286
const std::optional< CandleSymbol > & getEventSymbolOpt() const &noexcept override
Returns a symbol of this event.
Definition Candle.cpp:155
double getOpen() const noexcept
Returns the first (open) price of this candle.
Definition Candle.cpp:282
void setEventTime(std::int64_t eventTime) noexcept override
Changes event creation time.
Definition Candle.cpp:173
std::int64_t getCount() const noexcept
Returns total number of original trade (or quote) events in this candle.
Definition Candle.cpp:268
void setAskVolume(double askVolume) noexcept
Changes ask volume in this candle.
Definition Candle.cpp:384
double getBidVolume() const noexcept
Returns bid volume in this candle.
Definition Candle.cpp:366
Candle & withEventFlags(const EventFlagsMask &eventFlags) noexcept
Changes transactional event flags and returns the current candle.
Definition Candle.cpp:207
const CandleSymbol & getEventSymbol() const &noexcept override
Returns a symbol of this event.
Definition Candle.cpp:147
double getHigh() const noexcept
Returns the maximal (high) price of this candle.
Definition Candle.cpp:296
Candle & withClose(double close) noexcept
Changes the last (close) price of this candle.
Definition Candle.cpp:332
void setHigh(double high) noexcept
Changes the maximal (high) price of this candle.
Definition Candle.cpp:300
double getVWAP() const noexcept
Returns volume-weighted average price (VWAP) in this candle.
Definition Candle.cpp:352
Candle & withVolume(double volume) noexcept
Changes total volume in this candle.
Definition Candle.cpp:346
Candle & withEventFlags(std::int32_t eventFlags) noexcept
Changes transactional event flags and returns the current candle.
Definition Candle.cpp:197
void * toGraal() const override
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Definition Candle.cpp:104
double getLow() const noexcept
Returns the minimal (low) price of this candle.
Definition Candle.cpp:310
Candle & withIndex(std::int64_t index) noexcept
Changes the unique per-symbol index of this event.
Definition Candle.cpp:217
Candle & withLow(double low) noexcept
Changes the minimal (low) price of this candle.
Definition Candle.cpp:318
Candle & withEventSymbol(const CandleSymbol &eventSymbol) noexcept
Changes an event's symbol and returns the current candle.
Definition Candle.cpp:163
EventFlagsMask getEventFlagsMask() const noexcept override
Returns transactional event flags.
Definition Candle.cpp:189
double getVolume() const noexcept
Returns total volume in this candle.
Definition Candle.cpp:338
std::int64_t getIndex() const noexcept override
Returns unique per-symbol index of this event.
Definition Candle.cpp:225
void setLow(double low) noexcept
Changes the minimal (low) price of this candle.
Definition Candle.cpp:314
void setEventFlags(const EventFlagsMask &eventFlags) noexcept override
Changes transactional event flags.
Definition Candle.cpp:203
void setIndex(std::int64_t index) override
Changes unique per-symbol index of this event.
Definition Candle.cpp:213
Candle & withImpVolatility(double impVolatility) noexcept
Changes implied volatility.
Definition Candle.cpp:402
void setOpenInterest(double openInterest) noexcept
Changes the open interest.
Definition Candle.cpp:412
static void freeGraal(void *graalNative)
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
Definition Candle.cpp:124
Candle & withOpenInterest(double openInterest) noexcept
Changes the open interest.
Definition Candle.cpp:416
std::int64_t getEventTime() const noexcept override
Returns time when an event was created or zero when time is not available.
Definition Candle.cpp:169
Candle & withTime(std::int64_t time) noexcept
Changes the timestamp of the event in milliseconds.
Definition Candle.cpp:241
Candle & withVWAP(double vwap) noexcept
Changes volume-weighted average price (VWAP) in this candle.
Definition Candle.cpp:360
static constexpr std::uint32_t MAX_SEQUENCE
Maximum allowed sequence value.
Definition Candle.hpp:119
void setVWAP(double vwap) noexcept
Changes volume-weighted average price (VWAP) in this candle.
Definition Candle.cpp:356
static const EventTypeEnum & TYPE
Type identifier and additional information about the current event class.
Definition Candle.hpp:112
double getClose() const noexcept
Returns the last (close) price of this candle.
Definition Candle.cpp:324
Candle & withEventTime(std::int64_t eventTime) noexcept
Changes event's creation time and returns the current candle.
Definition Candle.cpp:177
std::int32_t getSequence() const noexcept
Returns the sequence number of this event to distinguish events that have the same time.
Definition Candle.cpp:247
std::int32_t getEventFlags() const noexcept override
Returns transactional event flags.
Definition Candle.cpp:185
void setCount(std::int64_t count) noexcept
Changes total number of original trade (or quote) events in this candle.
Definition Candle.cpp:272
double getOpenInterest() const noexcept
Returns the open interest.
Definition Candle.cpp:408
std::string toString() const override
Returns a string representation of the current object.
Definition Candle.cpp:424
void setVolume(double volume) noexcept
Changes total volume in this candle.
Definition Candle.cpp:342
constexpr std::uint32_t getMask() const noexcept
Returns an integer representation of an event mask.
Definition EventFlag.hpp:445
The enumeration type that provides additional information about the dxFeed Graal C++-API event type.
Definition EventTypeEnum.hpp:21
Symbol that should be used with DXFeedSubscription class to subscribe for Candle events.
Definition CandleSymbol.hpp:82
Marks all event types that can be received via dxFeed API.
Definition EventType.hpp:31