Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::vm::registered_host_functions< Cls, Execution_Interface, Type_Converter >::mappings Struct Reference

#include <host_function.hpp>

Collaboration diagram for sysio::vm::registered_host_functions< Cls, Execution_Interface, Type_Converter >::mappings:

Public Member Functions

template<auto F, typename R , typename Args , typename Preconditions >
void add_mapping (const std::string &mod, const std::string &name)
 
template<auto F, typename R , typename Args , typename Preconditions >
void add_mapping (const std::string &mod, const std::string &name)
 

Static Public Member Functions

static mappingsget ()
 
static mappingsget ()
 

Public Attributes

std::unordered_map< host_func_pair, uint32_t, host_func_pair_hashnamed_mapping
 
std::vector< std::function< void(Cls *, Type_Converter &)> > functions
 
std::vector< host_functionhost_functions
 
size_t current_index = 0
 

Detailed Description

template<typename Cls, typename Execution_Interface = execution_interface, typename Type_Converter = type_converter<Cls, Execution_Interface>>
struct sysio::vm::registered_host_functions< Cls, Execution_Interface, Type_Converter >::mappings

Definition at line 424 of file host_function.hpp.

Member Function Documentation

◆ add_mapping() [1/2]

template<typename Cls , typename Execution_Interface = execution_interface, typename Type_Converter = type_converter<Cls, Execution_Interface>>
template<auto F, typename R , typename Args , typename Preconditions >
void sysio::vm::registered_host_functions< Cls, Execution_Interface, Type_Converter >::mappings::add_mapping ( const std::string & mod,
const std::string & name )
inline

Definition at line 431 of file host_function.hpp.

431 {
432 named_mapping[{mod, name}] = current_index++;
433 functions.push_back(
435 std::make_index_sequence<std::tuple_size_v<Args>>()));
436 host_functions.push_back(
438 std::make_index_sequence<std::tuple_size_v<Args>>()));
439 }
std::string name
host_function function_types_provider(std::index_sequence< Is... >)
auto create_function(std::index_sequence< Is... >)
std::vector< std::function< void(Cls *, Type_Converter &)> > functions
std::unordered_map< host_func_pair, uint32_t, host_func_pair_hash > named_mapping
Here is the call graph for this function:

◆ add_mapping() [2/2]

template<typename Cls , typename Execution_Interface = execution_interface, typename Type_Converter = type_converter<Cls, Execution_Interface>>
template<auto F, typename R , typename Args , typename Preconditions >
void sysio::vm::registered_host_functions< Cls, Execution_Interface, Type_Converter >::mappings::add_mapping ( const std::string & mod,
const std::string & name )
inline

Definition at line 431 of file host_function.hpp.

431 {
432 named_mapping[{mod, name}] = current_index++;
433 functions.push_back(
435 std::make_index_sequence<std::tuple_size_v<Args>>()));
436 host_functions.push_back(
438 std::make_index_sequence<std::tuple_size_v<Args>>()));
439 }
Here is the call graph for this function:

◆ get() [1/2]

template<typename Cls , typename Execution_Interface = execution_interface, typename Type_Converter = type_converter<Cls, Execution_Interface>>
static mappings & sysio::vm::registered_host_functions< Cls, Execution_Interface, Type_Converter >::mappings::get ( )
inlinestatic

Definition at line 441 of file host_function.hpp.

441 {
442 static mappings instance;
443 return instance;
444 }
Here is the caller graph for this function:

◆ get() [2/2]

template<typename Cls , typename Execution_Interface = execution_interface, typename Type_Converter = type_converter<Cls, Execution_Interface>>
static mappings & sysio::vm::registered_host_functions< Cls, Execution_Interface, Type_Converter >::mappings::get ( )
inlinestatic

Definition at line 441 of file host_function.hpp.

441 {
442 static mappings instance;
443 return instance;
444 }

Member Data Documentation

◆ current_index

template<typename Cls , typename Execution_Interface = execution_interface, typename Type_Converter = type_converter<Cls, Execution_Interface>>
size_t sysio::vm::registered_host_functions< Cls, Execution_Interface, Type_Converter >::mappings::current_index = 0

Definition at line 428 of file host_function.hpp.

◆ functions

template<typename Cls , typename Execution_Interface = execution_interface, typename Type_Converter = type_converter<Cls, Execution_Interface>>
std::vector< std::function< void(Cls *, Type_Converter &)> > sysio::vm::registered_host_functions< Cls, Execution_Interface, Type_Converter >::mappings::functions

Definition at line 426 of file host_function.hpp.

◆ host_functions

template<typename Cls , typename Execution_Interface = execution_interface, typename Type_Converter = type_converter<Cls, Execution_Interface>>
std::vector< host_function > sysio::vm::registered_host_functions< Cls, Execution_Interface, Type_Converter >::mappings::host_functions

Definition at line 427 of file host_function.hpp.

◆ named_mapping

template<typename Cls , typename Execution_Interface = execution_interface, typename Type_Converter = type_converter<Cls, Execution_Interface>>
std::unordered_map< host_func_pair, uint32_t, host_func_pair_hash > sysio::vm::registered_host_functions< Cls, Execution_Interface, Type_Converter >::mappings::named_mapping

Definition at line 425 of file host_function.hpp.


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