-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
141 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
include/dxfeed_graal_cpp_api/internal/managers/InstrumentProfileCollectorManager.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 InstrumentProfileCollector; | ||
|
||
using InstrumentProfileCollectorManager = EntityManager<InstrumentProfileCollector>; | ||
|
||
} // namespace dxfcpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
include/dxfeed_graal_cpp_api/ipf/live/InstrumentProfileCollector.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) 2023 Devexperts LLC. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
#pragma once | ||
|
||
#include "../../internal/Conf.hpp" | ||
|
||
#include "../../internal/Common.hpp" | ||
|
||
namespace dxfcpp { | ||
|
||
class DXFCPP_EXPORT InstrumentProfileCollector final : public SharedEntity { | ||
Id<InstrumentProfileCollector> id_; | ||
JavaObjectHandle<InstrumentProfileCollector> handle_; | ||
|
||
InstrumentProfileCollector() noexcept; | ||
|
||
public: | ||
|
||
/// The alias to a type of shared pointer to the InstrumentProfileCollector object | ||
using Ptr = std::shared_ptr<InstrumentProfileCollector>; | ||
|
||
/// The alias to a type of unique pointer to the InstrumentProfileCollector object | ||
using Unique = std::unique_ptr<InstrumentProfileCollector>; | ||
|
||
/** | ||
* Creates the new InstrumentProfileCollector | ||
* | ||
* @return The new InstrumentProfileCollector | ||
*/ | ||
static Ptr create() noexcept; | ||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// 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 { | ||
|
||
InstrumentProfileCollector::InstrumentProfileCollector() noexcept : id_{Id<InstrumentProfileCollector>::UNKNOWN}, handle_{} { | ||
handle_ = JavaObjectHandle<InstrumentProfileCollector>(dxfcpp::isolated::ipf::InstrumentProfileCollector::create()); | ||
} | ||
|
||
InstrumentProfileCollector::Ptr InstrumentProfileCollector::create() noexcept { | ||
auto collector = std::shared_ptr<InstrumentProfileCollector>(new InstrumentProfileCollector()); | ||
|
||
collector->id_ = ApiContext::getInstance()->getManager<InstrumentProfileCollectorManager>()->registerEntity(collector); | ||
|
||
return collector; | ||
} | ||
|
||
} |