Skip to content

Commit

Permalink
[MDAPI-82][C++] Implement MarketDepthModel
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatolyKalin committed Nov 28, 2024
1 parent 452c2d9 commit 6e22794
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions include/dxfeed_graal_cpp_api/event/market/OrderBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ DXFCXX_DISABLE_MSC_WARNINGS_PUSH(4251)
#include "../EventTypeEnum.hpp"
#include "../IndexedEvent.hpp"
#include "../IndexedEventSource.hpp"
#include "../../exceptions/InvalidArgumentException.hpp"
#include "MarketEvent.hpp"
#include "OrderAction.hpp"
#include "OrderSource.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/dxfeed_graal_cpp_api/internal/Timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct Timer {
Timer() noexcept = default;

public:
constexpr void sleep(std::chrono::milliseconds ms) const {
void sleep(std::chrono::milliseconds ms) const {
while (isRunning_) {
std::this_thread::sleep_for(ms);
}
Expand Down
4 changes: 2 additions & 2 deletions include/dxfeed_graal_cpp_api/model/MarketDepthModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ struct DXFCPP_EXPORT MarketDepthModel final : RequireMakeShared<MarketDepthModel

std::shared_ptr<Builder> withAggregationPeriod(std::chrono::milliseconds aggregationPeriod);

std::shared_ptr<MarketDepthModel> build() const;
std::shared_ptr<MarketDepthModel> build();
};

private:
std::recursive_mutex mtx_{};
mutable std::recursive_mutex mtx_{};
std::shared_ptr<IndexedTxModel> indexedTxModel_{};
std::shared_ptr<MarketDepthModelListenerCommon> listener_{};
std::size_t depthLimit_{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ struct DXFCPP_EXPORT MarketDepthModelListenerCommon : virtual SharedEntity {

template <Derived<OrderBase> E>
struct DXFCPP_EXPORT MarketDepthModelListener final : MarketDepthModelListenerCommon,
RequireMakeShared<MarketDepthModelListener<E>> {
explicit MarketDepthModelListener(LockExternalConstructionTag) {};
RequireMakeShared<MarketDepthModelListener<E>> {
explicit MarketDepthModelListener(RequireMakeShared<MarketDepthModelListener<E>>::LockExternalConstructionTag) {};

~MarketDepthModelListener() override = default;

Expand Down
2 changes: 1 addition & 1 deletion src/model/MarketDepthModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ MarketDepthModel::Builder::withAggregationPeriod(std::chrono::milliseconds aggre
return withAggregationPeriod(aggregationPeriod.count());
}

std::shared_ptr<MarketDepthModel> MarketDepthModel::Builder::build() const {
std::shared_ptr<MarketDepthModel> MarketDepthModel::Builder::build() {
return MarketDepthModel::createShared(sharedAs<Builder>());
}

Expand Down

0 comments on commit 6e22794

Please sign in to comment.