Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MDAPI-79] [C++] Retrieve promise-based events from feed #59

Merged
merged 7 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
-DCMAKE_C_COMPILER=${{matrix.config.cc}}
-DCMAKE_CXX_COMPILER=${{matrix.config.cxx}}
-DDXFCXX_BUILD_DOC=OFF
-DDXFCXX_FEATURE_STACKTRACE=ON

- name: Configure CMake
if: ${{ contains(matrix.config.os, 'linux') }}
Expand All @@ -96,13 +97,15 @@ jobs:
-DCMAKE_C_COMPILER=${{matrix.config.cc}}
-DCMAKE_CXX_COMPILER=${{matrix.config.cxx}}
-DDXFCXX_BUILD_DOC=OFF
-DDXFCXX_FEATURE_STACKTRACE=ON

- name: Configure CMake
if: ${{ contains(matrix.config.os, 'win') }}
run: >
cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{matrix.buildType}}
-DDXFCXX_BUILD_DOC=OFF
-DDXFCXX_FEATURE_STACKTRACE=ON

- name: Build
if: ${{ !contains(matrix.config.os, 'win') }}
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ jobs:
-DDXFCXX_INSTALL_SAMPLES=OFF
-DDXFCXX_INSTALL_TOOLS=OFF
-DDXFCXX_BUILD_DOC=OFF
-DDXFCXX_FEATURE_STACKTRACE=ON

- name: Configure CMake [Samples][Tools]
if: ${{ contains(matrix.config.os, 'windows') && !contains(matrix.buildType, 'Deb') }}
Expand All @@ -129,6 +130,7 @@ jobs:
-DDXFCXX_INSTALL_LIB=OFF
-DDXFCXX_INSTALL_TOOLS=OFF
-DDXFCXX_BUILD_DOC=OFF
-DDXFCXX_FEATURE_STACKTRACE=ON

cmake -B ${{github.workspace}}/build-Tools
-DCMAKE_BUILD_TYPE=${{matrix.buildType}}
Expand All @@ -139,6 +141,7 @@ jobs:
-DDXFCXX_INSTALL_LIB=OFF
-DDXFCXX_INSTALL_SAMPLES=OFF
-DDXFCXX_BUILD_DOC=OFF
-DDXFCXX_FEATURE_STACKTRACE=ON

- name: Configure CMake [Lib]
if: ${{ contains(matrix.config.os, 'macos') }}
Expand All @@ -155,6 +158,7 @@ jobs:
-DDXFCXX_INSTALL_SAMPLES=OFF
-DDXFCXX_INSTALL_TOOLS=OFF
-DDXFCXX_BUILD_DOC=OFF
-DDXFCXX_FEATURE_STACKTRACE=ON

- name: Configure CMake [Samples][Tools]
if: ${{ contains(matrix.config.os, 'macos') && !contains(matrix.buildType, 'Deb') }}
Expand All @@ -170,6 +174,7 @@ jobs:
-DDXFCXX_INSTALL_LIB=OFF
-DDXFCXX_INSTALL_TOOLS=OFF
-DDXFCXX_BUILD_DOC=OFF
-DDXFCXX_FEATURE_STACKTRACE=ON

cmake -B ${{github.workspace}}/build-Tools
-DCMAKE_BUILD_TYPE=${{matrix.buildType}}
Expand All @@ -182,6 +187,7 @@ jobs:
-DDXFCXX_INSTALL_LIB=OFF
-DDXFCXX_INSTALL_SAMPLES=OFF
-DDXFCXX_BUILD_DOC=OFF
-DDXFCXX_FEATURE_STACKTRACE=ON

- name: Configure CMake [Lib]
if: ${{ contains(matrix.config.os, 'linux') }}
Expand All @@ -198,6 +204,7 @@ jobs:
-DDXFCXX_INSTALL_SAMPLES=OFF
-DDXFCXX_INSTALL_TOOLS=OFF
-DDXFCXX_BUILD_DOC=OFF
-DDXFCXX_FEATURE_STACKTRACE=ON

- name: Configure CMake [Samples][Tools]
if: ${{ contains(matrix.config.os, 'linux') && !contains(matrix.buildType, 'Deb') }}
Expand All @@ -213,6 +220,7 @@ jobs:
-DDXFCXX_INSTALL_LIB=OFF
-DDXFCXX_INSTALL_TOOLS=OFF
-DDXFCXX_BUILD_DOC=OFF
-DDXFCXX_FEATURE_STACKTRACE=ON

cmake -B ${{github.workspace}}/build-Tools
-DCMAKE_BUILD_TYPE=${{matrix.buildType}}
Expand All @@ -225,6 +233,7 @@ jobs:
-DDXFCXX_INSTALL_LIB=OFF
-DDXFCXX_INSTALL_SAMPLES=OFF
-DDXFCXX_BUILD_DOC=OFF
-DDXFCXX_FEATURE_STACKTRACE=ON

- name: Build [Lib]
if: ${{ !contains(matrix.config.os, 'win') }}
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ set(dxFeedGraalCxxApi_OnDemand_Sources

set(dxFeedGraalCxxApi_Promise_Sources
src/promise/Promise.cpp
src/promise/Promises.cpp
)

set(dxFeedGraalCxxApi_Symbols_Sources
Expand Down
73 changes: 46 additions & 27 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,53 @@
## v3.0.0
* **\[MDAPI-79]\[C++]** Retrieve promise-based events from feed
* Added `PromiseList<E>` class where `E` - event type: a list of event receiving results that will be completed
normally or exceptionally in the future.
It is a `std::vector<Promise<std::shared_ptr<E>>>` wrapper with Graal semantics.
* Added `Promise<void>` class.
* Added `Promises` class: utility methods to manipulate `Promise<>` promises.
* Added `Promises::allOf(Collection &&collection)` method that returns a new promise that completes when all
promises from the given collection complete normally or exceptionally.
* Fixed the `Promise<std::shared_ptr<E>>` semantics.
* Added `DXFeed::getLastEventPromise` method.
* Added `DXFeed::getLastEventsPromises` method.
* Added `DXFeed::getIndexedEventsPromise` method.
* **\[BREAKING]** The `DXFeed::getTimeSeriesPromise` now returns `std::shared_ptr<Promise<std::vector<std::shared_ptr<E>>>>`
* **\[BREAKING]** The `IndexedEventSubscriptionSymbol::getSource` method now returns `std::unique_ptr<IndexedEventSource>`

## v3.0.0

* **\[MDAPI-37]\[C++]** Retrieve latest events from feed.
* Added `SymbolWrapper::toStringUnderlying` method that returns a string representation of the underlying symbol object.
* Added `EventType::assign`. All `EventType` successors can populate their fields using `EventType` successors of the same type.
* Added `DXFeed::getLastEventIfSubscribed` method.
* Added `DXFeed::getLastEvent` and `DXFeed::getLastEvents` methods that use the `DXFeed::getLastEventIfSubscribed` method.
* Added `SymbolWrapper::toStringUnderlying` method that returns a string representation of the underlying symbol
object.
* Added `EventType::assign`. All `EventType` successors can populate their fields using `EventType` successors of
the same type.
* Added `DXFeed::getLastEventIfSubscribed` method.
* Added `DXFeed::getLastEvent` and `DXFeed::getLastEvents` methods that use the `DXFeed::getLastEventIfSubscribed`
method.
* **\[MDAPI-113]\[C++]\[Tools]** Tools should report invalid event type.
* Added classes: `RuntimeException`, `InvalidArgumentException`.
* `InvalidArgumentException`, `GraalException`, `JavaException` are now descendants of the `RuntimeException` class, which can collect stacktrace.
* Now an `InvalidArgumentException` exception is thrown instead of the `std::invalid_argument` exception.
* `Tools` now reports incorrect event types specified by the user.
* Added classes: `RuntimeException`, `InvalidArgumentException`.
* `InvalidArgumentException`, `GraalException`, `JavaException` are now descendants of the `RuntimeException` class,
which can collect stacktrace.
* Now an `InvalidArgumentException` exception is thrown instead of the `std::invalid_argument` exception.
* `Tools` now reports incorrect event types specified by the user.
* **\[MDAPI-80]\[C++]\[IPF]** Implement custom fields in InstrumentProfile.
* The API was migrated to Graal SDK v1.1.22.
* Added methods:
* `InstrumentProfile::getField`
* `InstrumentProfile::setField`
* `InstrumentProfile::getNumericField`
* `InstrumentProfile::setNumericField`
* `InstrumentProfile::getDateField`
* `InstrumentProfile::setDateField`
* `InstrumentProfile::getNonEmptyCustomFieldNames`
* **\[BREAKING]**: All `toString` methods can now throw exceptions.
* The API was migrated to Graal SDK v1.1.22.
* Added methods:
* `InstrumentProfile::getField`
* `InstrumentProfile::setField`
* `InstrumentProfile::getNumericField`
* `InstrumentProfile::setNumericField`
* `InstrumentProfile::getDateField`
* `InstrumentProfile::setDateField`
* `InstrumentProfile::getNonEmptyCustomFieldNames`
* **\[BREAKING]**: All `toString` methods can now throw exceptions.
* **\[MDAPI-26]\[C++]** Migrate to Graal SDK v1.1.21.
* Added `Day::getSessions` method.
* New order sources added: `CEDX` and `cedx`.
* Added the ability to use dxFeed Graal SDK stub. In other words, now API can be built for any 32 and 64 platforms.
* Added `TimePeriod` class.
* Added `DXFeedSubscription::getAggregationPeriod` and `DXFeedSubscription::setAggregationPeriod` methods.
* Added `DXFeedSubscription::getEventsBatchLimit` and `DXFeedSubscription::setEventsBatchLimit` methods.
* Added `AuthToken` class.
* Added `InstrumentProfileReader::readFromFile(address, token)` method.
* Added `Day::getSessions` method.
* New order sources added: `CEDX` and `cedx`.
* Added the ability to use dxFeed Graal SDK stub. In other words, now API can be built for any 32 and 64 platforms.
* Added `TimePeriod` class.
* Added `DXFeedSubscription::getAggregationPeriod` and `DXFeedSubscription::setAggregationPeriod` methods.
* Added `DXFeedSubscription::getEventsBatchLimit` and `DXFeedSubscription::setEventsBatchLimit` methods.
* Added `AuthToken` class.
* Added `InstrumentProfileReader::readFromFile(address, token)` method.

## v2.0.0
1 change: 1 addition & 0 deletions include/dxfeed_graal_cpp_api/api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,6 @@ DXFCXX_DISABLE_MSC_WARNINGS_PUSH(4251 4996)
#include "ondemand/OnDemandService.hpp"

#include "promise/Promise.hpp"
#include "promise/Promises.hpp"

DXFCXX_DISABLE_MSC_WARNINGS_POP()
Loading