Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
stateful_cnv Struct Reference
Inheritance diagram for stateful_cnv:
Collaboration diagram for stateful_cnv:

Public Member Functions

template<typename T >
auto from_wasm (uint32_t val) const -> std::enable_if_t< std::is_same_v< T, has_stateful_conversion >, stateful_conversion >
 
template<typename T >
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_span_type_v< T >, T >
 
template<typename T >
auto from_wasm (wasm_ptr_t ptr, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&std::is_pointer_v< typename T::proxy_type >, T >
 
- Public Member Functions inherited from sysio::vm::type_converter< standalone_function_t >
 SYS_VM_FROM_WASM (bool,(uint32_t value))
 
 SYS_VM_FROM_WASM (bool,(uint32_t value))
 
uint32_t to_wasm (bool &&value)
 
no_match_t to_wasm (T &&)
 
uint32_t to_wasm (bool &&value)
 
no_match_t to_wasm (T &&)
 
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_span_type_v< T >, T >
 
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&is_span_type_v< typename T::proxy_type >, T >
 
auto from_wasm (wasm_ptr_t ptr, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&std::is_pointer_v< typename T::proxy_type >, T >
 
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_span_type_v< T >, T >
 
auto from_wasm (wasm_ptr_t ptr, wasm_size_t len, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&is_span_type_v< typename T::proxy_type >, T >
 
auto from_wasm (wasm_ptr_t ptr, tag< T >={}) const -> std::enable_if_t< is_argument_proxy_type_v< T > &&std::is_pointer_v< typename T::proxy_type >, T >
 
decltype(auto) as_value (const elem_type &val) const
 
decltype(auto) as_value (const elem_type &val) const
 
constexpr auto as_result (T &&val) const
 
constexpr auto as_result (T &&val) const
 
 running_context (Host_Type *host, const execution_interface &ei)
 
 running_context (Host_Type *host, execution_interface &&ei)
 
decltype(auto) get_host ()
 
- Public Member Functions inherited from sysio::vm::running_context< standalone_function_t, execution_interface >
 running_context (standalone_function_t *host, const execution_interface &ei)
 
 running_context (standalone_function_t *host, execution_interface &&ei)
 
 running_context (standalone_function_t *host, const execution_interface &ei)
 
 running_context (standalone_function_t *host, execution_interface &&ei)
 
void * access (wasm_ptr_t addr=0) const
 
void * access (wasm_ptr_t addr=0) const
 
execution_interfaceget_interface ()
 
const execution_interfaceget_interface () const
 
execution_interfaceget_interface ()
 
const execution_interfaceget_interface () const
 
decltype(auto) get_host ()
 
decltype(auto) get_host ()
 
auto validate_pointer (U ptr, wasm_size_t len) const
 
auto validate_pointer (U ptr, wasm_size_t len) const
 
auto validate_null_terminated_pointer (T ptr) const
 
auto validate_null_terminated_pointer (T ptr) const
 

Additional Inherited Members

- Public Types inherited from sysio::vm::type_converter< standalone_function_t >
using base_type
 
using elem_type
 
- Public Types inherited from sysio::vm::running_context< standalone_function_t, execution_interface >
using running_context_t
 
- Public Attributes inherited from sysio::vm::running_context< standalone_function_t, execution_interface >
standalone_function_thost
 
execution_interface interface
 

Detailed Description

Definition at line 419 of file host_functions_tests.cpp.

Member Function Documentation

◆ from_wasm() [1/3]

template<typename T >
auto stateful_cnv::from_wasm ( uint32_t val) const -> std::enable_if_t<std::is_same_v<T, has_stateful_conversion>, stateful_conversion>
inline

Definition at line 423 of file host_functions_tests.cpp.

425 {
426 return { val };
427 }

◆ from_wasm() [2/3]

template<typename T >
auto sysio::vm::type_converter< Host, Execution_Interface >::from_wasm ( wasm_ptr_t ptr,
tag< T > = {} ) const -> std::enable_if_t< is_argument_proxy_type_v<T> && std::is_pointer_v<typename T::proxy_type>, T>
inline

Definition at line 97 of file host_function.hpp.

97 {}) const
98 -> std::enable_if_t< is_argument_proxy_type_v<T> &&
99 std::is_pointer_v<typename T::proxy_type>, T> {
100 auto p = this->template validate_pointer<typename T::pointee_type>(ptr, 1);
101 return {p};
102 }
const mie::Vuint & p
Definition bn.cpp:27
#define T(meth, val, expected)

◆ from_wasm() [3/3]

template<typename T >
auto sysio::vm::type_converter< Host, Execution_Interface >::from_wasm ( wasm_ptr_t ptr,
wasm_size_t len,
tag< T > = {} ) const -> std::enable_if_t<is_span_type_v<T>, T>
inline

Definition at line 82 of file host_function.hpp.

82 {}) const
83 -> std::enable_if_t<is_span_type_v<T>, T> {
84 auto p = this->template validate_pointer<typename T::value_type>(ptr, len);
85 return {static_cast<typename T::pointer>(p), len};
86 }
size_t len

The documentation for this struct was generated from the following file: