Kagome
Polkadot Runtime Engine in C++17
kagome::runtime::binaryen::BinaryenMemoryProvider Class Referencefinal

#include <binaryen_memory_provider.hpp>

Inheritance diagram for kagome::runtime::binaryen::BinaryenMemoryProvider:
Collaboration diagram for kagome::runtime::binaryen::BinaryenMemoryProvider:

Public Types

enum  Error { Error::OUTDATED_EXTERNAL_INTERFACE = 1 }
 

Public Member Functions

 BinaryenMemoryProvider (std::shared_ptr< const BinaryenMemoryFactory > memory_factory)
 
std::optional< std::reference_wrapper< runtime::Memory > > getCurrentMemory () const override
 
outcome::result< void > resetMemory (WasmSize heap_base) override
 
void setExternalInterface (std::weak_ptr< RuntimeExternalInterface > rei)
 
- Public Member Functions inherited from kagome::runtime::MemoryProvider
virtual ~MemoryProvider ()=default
 

Private Attributes

std::weak_ptr< RuntimeExternalInterfaceexternal_interface_
 
std::shared_ptr< const BinaryenMemoryFactorymemory_factory_
 
std::shared_ptr< MemoryImplmemory_
 

Detailed Description

Definition at line 20 of file binaryen_memory_provider.hpp.

Member Enumeration Documentation

Enumerator
OUTDATED_EXTERNAL_INTERFACE 

Definition at line 22 of file binaryen_memory_provider.hpp.

Constructor & Destructor Documentation

kagome::runtime::binaryen::BinaryenMemoryProvider::BinaryenMemoryProvider ( std::shared_ptr< const BinaryenMemoryFactory memory_factory)

Definition at line 24 of file binaryen_memory_provider.cpp.

Member Function Documentation

std::optional< std::reference_wrapper< runtime::Memory > > kagome::runtime::binaryen::BinaryenMemoryProvider::getCurrentMemory ( ) const
overridevirtual

Implements kagome::runtime::MemoryProvider.

Definition at line 31 of file binaryen_memory_provider.cpp.

outcome::result< void > kagome::runtime::binaryen::BinaryenMemoryProvider::resetMemory ( WasmSize  heap_base)
overridevirtual

Implements kagome::runtime::MemoryProvider.

Definition at line 37 of file binaryen_memory_provider.cpp.

void kagome::runtime::binaryen::BinaryenMemoryProvider::setExternalInterface ( std::weak_ptr< RuntimeExternalInterface rei)

Definition at line 48 of file binaryen_memory_provider.cpp.

Member Data Documentation

std::weak_ptr<RuntimeExternalInterface> kagome::runtime::binaryen::BinaryenMemoryProvider::external_interface_
private

Definition at line 36 of file binaryen_memory_provider.hpp.

std::shared_ptr<MemoryImpl> kagome::runtime::binaryen::BinaryenMemoryProvider::memory_
private

Definition at line 38 of file binaryen_memory_provider.hpp.

std::shared_ptr<const BinaryenMemoryFactory> kagome::runtime::binaryen::BinaryenMemoryProvider::memory_factory_
private

Definition at line 37 of file binaryen_memory_provider.hpp.


The documentation for this class was generated from the following files: