Skip to content

Commit

Permalink
[MDAPI-84][C++] Implement TimeSeriesTxModel
Browse files Browse the repository at this point in the history
Fix docs.
  • Loading branch information
AnatolyKalin committed Nov 23, 2024
1 parent 801e0fc commit c74edef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
24 changes: 2 additions & 22 deletions include/dxfeed_graal_cpp_api/model/IndexedTxModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ struct DXFeed;
*
* ```cpp
* auto feed = DXEndpoint::getInstance(DXEndpoint::Role::FEED)->connect("demo.dxfeed.com:7300")->getFeed();
* auto listener = TxModelListener::create<Order>([](const auto &, const auto &events, bool isSnapshot) {
* auto listener = TxModelListener<Order>::create([](const auto &, const auto &events, bool isSnapshot) {
* if (isSnapshot) {
* std::cout << "Snapshot:" << std::endl;
* } else {
Expand Down Expand Up @@ -168,7 +168,7 @@ struct DXFCPP_EXPORT IndexedTxModel : RequireMakeShared<IndexedTxModel> {
* The listener cannot be changed or added once the model has been built.
*
* ```cpp
* auto listener = TxModelListener::create<Order>([](const auto &, const auto &events, bool isSnapshot) {
* auto listener = TxModelListener<Order>::create([](const auto &, const auto &events, bool isSnapshot) {
* if (isSnapshot) {
* std::cout << "Snapshot:" << std::endl;
* } else {
Expand All @@ -185,26 +185,6 @@ struct DXFCPP_EXPORT IndexedTxModel : RequireMakeShared<IndexedTxModel> {
* builder->withListener(listener);
* ```
*
* ```cpp
* auto builder = IndexedTxModel::newBuilder(Order::TYPE);
*
* builder->withListener(TxModelListener::create([](const auto &, const auto &events, bool isSnapshot) {
* if (isSnapshot) {
* std::cout << "Snapshot:" << std::endl;
* } else {
* std::cout << "Update:" << std::endl;
* }
*
* for (const auto &e : events) {
* if (auto o = e->template sharedAs<Order>()) {
* std::cout << "[" << o->getEventFlagsMask().toString() << "]:" << o << std::endl;
* }
* }
*
* std::cout << std::endl;
* }));
* ```
*
* @param listener The transaction listener.
* @return `this` builder.
*/
Expand Down
2 changes: 1 addition & 1 deletion include/dxfeed_graal_cpp_api/model/TxModelListener.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct DXFCPP_EXPORT TxModelListener : TxModelListenerCommon, RequireMakeShared<
* Creates a listener for receiving indexed events (with instantiation by event type `E` and verification)
*
* ```cpp
* auto listener = TxModelListener::create<Order>([](const auto &, const auto &events, bool isSnapshot) {
* auto listener = TxModelListener<Order>::create([](const auto &, const auto &events, bool isSnapshot) {
* if (isSnapshot) {
* std::cout << "Snapshot:" << std::endl;
* } else {
Expand Down

0 comments on commit c74edef

Please sign in to comment.