6 #ifndef KAGOME_CORE_RUNTIME_INSTANCE_ENVIRONMENT_HPP 7 #define KAGOME_CORE_RUNTIME_INSTANCE_ENVIRONMENT_HPP 17 class TrieStorageProvider;
25 std::shared_ptr<MemoryProvider> memory_provider,
26 std::shared_ptr<TrieStorageProvider> storage_provider,
27 std::shared_ptr<host_api::HostApi> host_api,
29 : memory_provider(
std::move(memory_provider)),
30 storage_provider(
std::move(storage_provider)),
31 host_api(
std::move(host_api)),
32 on_destruction(
std::move(on_destruction)) {}
35 : memory_provider(
std::move(e.memory_provider)),
36 storage_provider(
std::move(e.storage_provider)),
37 host_api(
std::move(e.host_api)),
38 on_destruction(
std::move(e.on_destruction)) {
39 e.on_destruction = {};
45 on_destruction(*
this);
57 #endif // KAGOME_CORE_RUNTIME_INSTANCE_ENVIRONMENT_HPP std::function< void(InstanceEnvironment &)> on_destruction
std::shared_ptr< TrieStorageProvider > storage_provider
InstanceEnvironment(std::shared_ptr< MemoryProvider > memory_provider, std::shared_ptr< TrieStorageProvider > storage_provider, std::shared_ptr< host_api::HostApi > host_api, std::function< void(InstanceEnvironment &)> on_destruction)
std::shared_ptr< MemoryProvider > memory_provider
std::shared_ptr< host_api::HostApi > host_api
InstanceEnvironment(InstanceEnvironment &&e) noexcept