|
dxFeed Graal CXX API v9.0.0
|
A helper wrapper class needed to pass heterogeneous event sources using a container and convert them to internal Graal representation. More...
#include <EventSourceWrapper.hpp>
Public Member Functions | |
| EventSourceWrapper (const IndexedEventSource &data) noexcept | |
| Constructs a wrapper from IndexedEventSource. | |
| EventSourceWrapper (const OrderSource &data) noexcept | |
| Constructs a wrapper from OrderSource. | |
| void * | toGraal () const |
| Allocates memory for the dxFeed Graal SDK structure (recursively if necessary). | |
| std::unique_ptr< void, decltype(&EventSourceWrapper::freeGraal)> | toGraalUnique () const |
| Allocates memory for the dxFeed Graal SDK structure (recursively if necessary). | |
| std::string | toString () const |
| Returns a string representation of the current object. | |
| std::string | toStringUnderlying () const |
| Returns a string representation of the underlying object. | |
| bool | isIndexedEventSource () const noexcept |
| bool | isOrderSource () const noexcept |
| std::optional< IndexedEventSource > | asIndexedEventSource () const noexcept |
| std::optional< OrderSource > | asOrderSource () const noexcept |
| const DataType & | getData () const noexcept |
Static Public Member Functions | |
| static void | freeGraal (void *graalNative) |
| Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary). | |
| static EventSourceWrapper | fromGraal (void *graalNative) |
| Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure. | |
A helper wrapper class needed to pass heterogeneous event sources using a container and convert them to internal Graal representation.
|
noexcept |
Constructs a wrapper from IndexedEventSource.
| data | The IndexedEventSource. |
|
noexcept |
Constructs a wrapper from OrderSource.
| data | The OrderSource. |
|
noexcept |
|
noexcept |
|
static |
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
| graalNative | The pointer to the dxFeed Graal SDK structure. |
| InvalidArgumentException |
References IndexedEventSource::freeGraal().
Referenced by toGraalUnique().
|
static |
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
| graalNative | The pointer to the dxFeed Graal SDK structure. |
| InvalidArgumentException | |
| RuntimeException | if an event source type is unknown |
References IndexedEventSource::fromGraal().
|
noexcept |
|
noexcept |
|
noexcept |
|
nodiscard |
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.
| InvalidArgumentException | if the name of the source is not valid UTF-8. |
Referenced by toGraalUnique().
| std::unique_ptr< void, decltype(&EventSourceWrapper::freeGraal)> EventSourceWrapper::toGraalUnique | ( | ) | const |
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.
| InvalidArgumentException | if the name of the source is not valid UTF-8. |
References freeGraal(), and toGraal().
| std::string EventSourceWrapper::toString | ( | ) | const |
Returns a string representation of the current object.
| std::string EventSourceWrapper::toStringUnderlying | ( | ) | const |
Returns a string representation of the underlying object.