|
dxFeed Graal CXX API v9.0.0
|
Configuration event with the text payload. More...
#include <TextConfiguration.hpp>
Public Types | |
| using | Ptr = std::shared_ptr<TextConfiguration> |
| The alias to a type of shared pointer to the TextConfiguration object. | |
| using | Unique = std::unique_ptr<TextConfiguration> |
| The alias to a type of unique pointer to the TextConfiguration object. | |
| Public Types inherited from EventTypeWithSymbol< std::string > | |
| using | Ptr = std::shared_ptr<EventTypeWithSymbol<std::string>> |
| The alias to a type of shared pointer to the EventTypeWithSymbol's child object. | |
| Public Types inherited from EventType | |
| using | Ptr = std::shared_ptr<EventType> |
| The alias to a type of shared pointer to the EventType object. | |
| Public Types inherited from SharedEntity | |
| using | Ptr = std::shared_ptr<SharedEntity> |
| The alias to a type of shared pointer to the SharedEntity object. | |
| Public Types inherited from LastingEvent | |
| using | Ptr = std::shared_ptr<LastingEvent> |
| The alias to a type of shared pointer to the LastingEvent object. | |
Public Member Functions | |
| void * | toGraal () const override |
| Allocates memory for the dxFeed Graal SDK structure (recursively if necessary). | |
| void | assign (std::shared_ptr< EventType > event) override |
| Replaces the contents of the event. | |
| TextConfiguration () noexcept | |
| Creates a new text configuration event with default values. | |
| TextConfiguration (StringParam eventSymbol) | |
| Creates a new text configuration event with the specified event symbol. | |
| TextConfiguration (StringParam eventSymbol, StringParam text) | |
| Creates a new text configuration event with the specified event symbol and text. | |
| TextConfiguration (StringParam eventSymbol, StringParam text, std::int32_t version) | |
| Creates a new text configuration event with the specified event symbol, text, and version. | |
| const std::string & | getEventSymbol () const &noexcept override |
| Returns the symbol of this event. | |
| const std::optional< std::string > & | getEventSymbolOpt () const &noexcept override |
| Returns the symbol of this event. | |
| void | setEventSymbol (StringParam eventSymbol) override |
| Changes the symbol of this event. | |
| TextConfiguration & | withEventSymbol (StringParam eventSymbol) |
| Changes the event's symbol and returns the current text configuration event. | |
| std::int64_t | getEventTime () const noexcept override |
| Returns time when an event was created or zero when time is not available. | |
| void | setEventTime (std::int64_t eventTime) noexcept override |
| Changes event creation time. | |
| TextConfiguration & | withEventTime (std::int64_t eventTime) noexcept |
| Changes the event's creation time and returns the current text configuration event. | |
| std::int64_t | getTimeSequence () const noexcept |
| Returns time and sequence of this event packaged into a single long value. | |
| void | setTimeSequence (std::int64_t timeSequence) noexcept |
| Changes time and sequence of this event. | |
| std::int64_t | getTime () const noexcept |
| Returns time of this text configuration event. | |
| void | setTime (std::int64_t time) noexcept |
| Changes time of this text configuration event. | |
| TextConfiguration & | withTime (std::int64_t time) noexcept |
| Changes time and returns the current text configuration event. | |
| std::int32_t | getSequence () const noexcept |
| Returns the sequence number of this event to distinguish text configuration events that have the same time. | |
| void | setSequence (std::int32_t sequence) |
| Changes the sequence number of this text configuration event. | |
| TextConfiguration & | withSequence (std::int32_t sequence) |
| Changes the event's sequence number and returns the current text configuration event. | |
| std::int32_t | getVersion () const noexcept |
| Returns the version of this event. | |
| void | setVersion (std::int32_t version) noexcept |
| Changes the version of this event. | |
| TextConfiguration & | withVersion (std::int32_t version) noexcept |
| Changes the version and returns the current text configuration event. | |
| const std::string & | getText () const &noexcept |
| Returns the text. | |
| const std::optional< std::string > & | getTextOpt () const &noexcept |
| Returns the text. | |
| void | setText (StringParam text) |
| Changes the text. | |
| template<OptionalString S> | |
| void | setText (S &&text) noexcept |
| Changes the text, or makes it null with std::nullopt. | |
| TextConfiguration & | withText (StringParam text) |
| Changes the text and returns the current text configuration event. | |
| template<OptionalString S> | |
| TextConfiguration & | withText (S &&text) noexcept |
| Changes the text, or makes it null with std::nullopt. | |
| std::string | toString () const override |
| Returns a string representation of the current object. | |
| Public Member Functions inherited from SharedEntity | |
| template<typename T> | |
| bool | is () const noexcept |
| Checks that the object is of type T: its dynamic type is T or derived from T. | |
| template<typename T> | |
| std::shared_ptr< T > | sharedAs () noexcept |
| Returns a pointer to the current object wrapped in a smart pointer to type T or std::shared_ptr<T>{nullptr} if the object is not managed by std::shared_ptr. | |
| template<typename T> | |
| std::shared_ptr< T > | sharedAs () const noexcept |
| Returns a pointer to the current object wrapped in a smart pointer to type T or std::shared_ptr<T>{nullptr} if the object is not managed by std::shared_ptr. | |
| Public Member Functions inherited from Entity | |
| virtual | ~Entity () noexcept |
| The default virtual d-tor. | |
Static Public Member Functions | |
| static Ptr | fromGraal (void *graalNative) |
| Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure. | |
| static void | freeGraal (void *graalNative) |
| Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary). | |
Static Public Attributes | |
| static constexpr std::uint32_t | MAX_SEQUENCE = (1U << 22U) - 1U |
| Maximum allowed sequence value. | |
| static const EventTypeEnum & | TYPE = EventTypeEnum::TEXT_CONFIGURATION |
| Type identifier and additional information about the current event class. | |
Configuration event with the text payload.
TextConfiguration event has the following properties:
The version field is used to track changes to the event data. When the version field is enabled (by default), events with a lower version number than the last received will be dropped. This is useful for conflating events, where only the latest version of an event is processed. This is only true when transferring under a TICKER contract and the version field is enabled.
This event is implemented on top of QDS record TextConfiguration.
|
explicit |
Creates a new text configuration event with the specified event symbol.
| eventSymbol | The event symbol. |
| TextConfiguration::TextConfiguration | ( | StringParam | eventSymbol, |
| StringParam | text ) |
Creates a new text configuration event with the specified event symbol and text.
| eventSymbol | The event symbol. |
| text | The text. |
References TextConfiguration().
Referenced by TextConfiguration().
| TextConfiguration::TextConfiguration | ( | StringParam | eventSymbol, |
| StringParam | text, | ||
| std::int32_t | version ) |
Creates a new text configuration event with the specified event symbol, text, and version.
| eventSymbol | The event symbol. |
| text | The text. |
| version | The version. |
References TextConfiguration().
Referenced by TextConfiguration().
|
overridevirtual |
Replaces the contents of the event.
| event | the event to use as a source. |
Reimplemented from EventType.
|
static |
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
| graalNative | The pointer to the dxFeed Graal SDK structure. |
| InvalidArgumentException |
|
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 |
|
overridevirtualnoexcept |
Returns the symbol of this event.
Implements EventTypeWithSymbol< std::string >.
|
overridevirtualnoexcept |
Returns the symbol of this event.
Implements EventTypeWithSymbol< std::string >.
|
overridevirtualnoexcept |
Returns time when an event was created or zero when time is not available.
This event time is available only when the corresponding DXEndpoint is created with DXENDPOINT_EVENT_TIME_PROPERTY and the data source has embedded event times. This is typically true only for data events that are read from historical tape files and from OnDemandService. Events that are coming from network connections do not have an embedded event time information, and this method will return zero for them, meaning that event was received just now.
The default implementation returns 0.
Reimplemented from EventType.
|
noexcept |
Returns the sequence number of this event to distinguish text configuration events that have the same time.
This sequence number does not have to be unique and does not need to be sequential. Sequence can range from 0 to TextConfiguration::MAX_SEQUENCE.
References MAX_SEQUENCE.
Referenced by setTime().
|
noexcept |
Returns the text.
|
noexcept |
Returns the text.
|
noexcept |
Returns time of this text configuration event.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
|
noexcept |
Returns time and sequence of this event packaged into a single long value.
|
noexcept |
Returns the version of this event.
|
overridevirtual |
Changes the symbol of this event.
| eventSymbol | The symbol of this event. |
Implements EventTypeWithSymbol< std::string >.
|
overridevirtualnoexcept |
Changes event creation time.
The default implementation does nothing.
| eventTime | the difference, measured in milliseconds, between the event creation time and midnight, January 1, 1970 UTC. |
Reimplemented from EventType.
Referenced by withEventTime().
| void TextConfiguration::setSequence | ( | std::int32_t | sequence | ) |
Changes the sequence number of this text configuration event.
| sequence | The sequence. |
| InvalidArgumentException | if the sequence is below zero or above TextConfiguration::MAX_SEQUENCE. |
References MAX_SEQUENCE.
Referenced by withSequence().
|
inlinenoexcept |
Changes the text, or makes it null with std::nullopt.
setText(other.getTextOpt()) copies it from another event, null included.
| text | the text or std::nullopt. |
| void TextConfiguration::setText | ( | StringParam | text | ) |
Changes the text.
| text | The text. |
|
noexcept |
Changes time of this text configuration event.
Time is measured in milliseconds between the current time and midnight, January 1, 1970 UTC.
| time | The time of this text configuration event. |
References getSequence().
Referenced by withTime().
|
noexcept |
|
noexcept |
Changes the version of this event.
| version | The version of this event. A higher value indicates a more recent update. |
Referenced by withVersion().
|
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.
Implements EventType.
|
overridevirtual |
Returns a string representation of the current object.
Reimplemented from EventType.
| TextConfiguration & TextConfiguration::withEventSymbol | ( | StringParam | eventSymbol | ) |
Changes the event's symbol and returns the current text configuration event.
| eventSymbol | The symbol of this event. |
|
noexcept |
Changes the event's creation time and returns the current text configuration event.
| eventTime | The difference, measured in milliseconds, between the event creation time and midnight, January 1, 1970 UTC. |
References setEventTime().
| TextConfiguration & TextConfiguration::withSequence | ( | std::int32_t | sequence | ) |
Changes the event's sequence number and returns the current text configuration event.
| sequence | The sequence. |
| InvalidArgumentException | if the sequence is below zero or above TextConfiguration::MAX_SEQUENCE. |
References setSequence().
|
inlinenoexcept |
Changes the text, or makes it null with std::nullopt.
Returns the current text configuration.
| text | the text or std::nullopt. |
| TextConfiguration & TextConfiguration::withText | ( | StringParam | text | ) |
Changes the text and returns the current text configuration event.
| text | The text. |
|
noexcept |
Changes time and returns the current text configuration event.
| time | The time of this text configuration event. |
References setTime().
|
noexcept |
Changes the version and returns the current text configuration event.
| version | The version of this event. A higher value indicates a more recent update. |
References setVersion().
|
staticconstexpr |
Maximum allowed sequence value.
Referenced by getSequence(), and setSequence().