Skip to content

Commit

Permalink
InstrumentProfileConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
ttldtor committed Oct 13, 2023
1 parent 1d2180e commit 9e9c21b
Show file tree
Hide file tree
Showing 9 changed files with 86 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ set(dxFeedGraalCxxApi_Ipf_Sources
src/ipf/InstrumentProfileField.cpp
src/ipf/InstrumentProfileReader.cpp
src/ipf/live/InstrumentProfileCollector.cpp
src/ipf/live/InstrumentProfileConnection.cpp
)

set(dxFeedGraalCxxApi_Symbols_Sources
Expand Down
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 @@ -26,6 +26,7 @@
#include "internal/managers/DXPublisherManager.hpp"
#include "internal/managers/InstrumentProfileReaderManager.hpp"
#include "internal/managers/InstrumentProfileCollectorManager.hpp"
#include "internal/managers/InstrumentProfileConnectionManager.hpp"
#include "internal/managers/EntityManager.hpp"
#include "internal/managers/ErrorHandlingManager.hpp"

Expand Down
4 changes: 3 additions & 1 deletion include/dxfeed_graal_cpp_api/internal/context/ApiContext.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "../managers/DXFeedSubscriptionManager.hpp"
#include "../managers/DXPublisherManager.hpp"
#include "../managers/InstrumentProfileCollectorManager.hpp"
#include "../managers/InstrumentProfileConnectionManager.hpp"
#include "../managers/InstrumentProfileReaderManager.hpp"

namespace dxfcpp {
Expand All @@ -32,7 +33,8 @@ class DXFCPP_EXPORT ApiContext : AddManagerMixin<DXEndpointManager>,
AddManagerMixin<DXFeedManager>,
AddManagerMixin<DXPublisherManager>,
AddManagerMixin<InstrumentProfileReaderManager>,
AddManagerMixin<InstrumentProfileCollectorManager> {
AddManagerMixin<InstrumentProfileCollectorManager>,
AddManagerMixin<InstrumentProfileConnectionManager> {
ApiContext() noexcept = default;

public:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) 2023 Devexperts LLC.
// SPDX-License-Identifier: MPL-2.0

#pragma once

#include "../Conf.hpp"

#include <memory>
#include <unordered_map>
#include <unordered_set>

#include "../Common.hpp"
#include "EntityManager.hpp"

namespace dxfcpp {

class InstrumentProfileConnection;

using InstrumentProfileConnectionManager = EntityManager<InstrumentProfileConnection>;

} // namespace dxfcpp
3 changes: 2 additions & 1 deletion include/dxfeed_graal_cpp_api/ipf/IpfModule.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
#include "InstrumentProfile.hpp"
#include "InstrumentProfileReader.hpp"

#include "live/InstrumentProfileCollector.hpp"
#include "live/InstrumentProfileCollector.hpp"
#include "live/InstrumentProfileConnection.hpp"
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
#include "../../internal/Conf.hpp"

#include "../../internal/Common.hpp"
#include "../../internal/Id.hpp"
#include "../../internal/JavaObjectHandle.hpp"

#include "../../entity/SharedEntity.hpp"

namespace dxfcpp {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) 2023 Devexperts LLC.
// SPDX-License-Identifier: MPL-2.0

#pragma once

#include "../../internal/Conf.hpp"

#include "../../internal/Common.hpp"
#include "../../internal/Id.hpp"
#include "../../internal/JavaObjectHandle.hpp"

#include "../../entity/SharedEntity.hpp"

namespace dxfcpp {

class DXFCPP_EXPORT InstrumentProfileConnection final : public SharedEntity {
Id<InstrumentProfileConnection> id_;
JavaObjectHandle<InstrumentProfileConnection> handle_;

//InstrumentProfileConnection() noexcept;

public:

/// The alias to a type of shared pointer to the InstrumentProfileConnection object
using Ptr = std::shared_ptr<InstrumentProfileConnection>;

/// The alias to a type of unique pointer to the InstrumentProfileConnection object
using Unique = std::unique_ptr<InstrumentProfileConnection>;
};

}
1 change: 1 addition & 0 deletions src/internal/JavaObjectHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ template struct JavaObjectHandle<DXFeedEventListener>;

template struct JavaObjectHandle<InstrumentProfileReader>;
template struct JavaObjectHandle<InstrumentProfileCollector>;
template struct JavaObjectHandle<InstrumentProfileConnection>;

} // namespace dxfcpp
22 changes: 22 additions & 0 deletions src/ipf/live/InstrumentProfileConnection.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (c) 2023 Devexperts LLC.
// SPDX-License-Identifier: MPL-2.0

#include <dxfg_api.h>

#include <dxfeed_graal_c_api/api.h>
#include <dxfeed_graal_cpp_api/api.hpp>

#include <cstring>
#include <memory>
#include <utf8.h>
#include <utility>

#include <fmt/chrono.h>
#include <fmt/format.h>
#include <fmt/ostream.h>
#include <fmt/std.h>

namespace dxfcpp {


}

0 comments on commit 9e9c21b

Please sign in to comment.