Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Static Public Member Functions | Static Public Attributes | List of all members
Jsonipc::CallTraits< F > Struct Template Reference

Template class providing conversion helpers for JsonValue to indexed C++ function argument. More...

#include "jsonipc.hh"

Classes

struct  TupleElement
 
struct  TupleElement< INDEX, false >
 

Public Types

using FuncType = typename std::decay< F >::type
 
using Arguments = typename FunctionTraits< FuncType >::Arguments
 
template<size_t INDEX>
using ArgType = typename TupleElement< HAS_THIS+INDEX,(INDEX< N_ARGS)>::Type
 
template<size_t INDEX>
using ConvertType = decltype(Convert< ArgType< INDEX > >::from_json(std::declval< JsonValue >()))
 

Static Public Member Functions

template<size_t INDEX>
static ConvertType< INDEX > arg_from_json (const CallbackInfo &args)
 
template<typename T , size_t ... INDICES>
static FunctionTraits< F >::ReturnType call_unpacked (T &obj, const F &func, const CallbackInfo &args, std::index_sequence< INDICES... >)
 

Static Public Attributes

static constexpr const bool HAS_THIS
 
static constexpr const size_t N_ARGS
 

Detailed Description

template<typename F>
struct Jsonipc::CallTraits< F >

Template class providing conversion helpers for JsonValue to indexed C++ function argument.

Definition at line 505 of file jsonipc.hh.


Class Documentation

◆ Jsonipc::CallTraits::TupleElement

struct Jsonipc::CallTraits::TupleElement
template<typename F>
template<size_t INDEX, bool>
struct Jsonipc::CallTraits< F >::TupleElement< INDEX, bool >

Definition at line 512 of file jsonipc.hh.

Class Members
typedef typename type Type

◆ Jsonipc::CallTraits::TupleElement< INDEX, false >

struct Jsonipc::CallTraits::TupleElement< INDEX, false >
template<typename F>
template<size_t INDEX>
struct Jsonipc::CallTraits< F >::TupleElement< INDEX, false >

Definition at line 513 of file jsonipc.hh.

Class Members
typedef void Type

Member Typedef Documentation

◆ ArgType

template<typename F >
template<size_t INDEX>
using Jsonipc::CallTraits< F >::ArgType = typename TupleElement<HAS_THIS + INDEX, (INDEX < N_ARGS)>::Type

Definition at line 514 of file jsonipc.hh.

◆ Arguments

template<typename F >
using Jsonipc::CallTraits< F >::Arguments = typename FunctionTraits<FuncType>::Arguments

Definition at line 507 of file jsonipc.hh.

◆ ConvertType

template<typename F >
template<size_t INDEX>
using Jsonipc::CallTraits< F >::ConvertType = decltype (Convert<ArgType<INDEX> >::from_json (std::declval<JsonValue>()))

Definition at line 515 of file jsonipc.hh.

◆ FuncType

template<typename F >
using Jsonipc::CallTraits< F >::FuncType = typename std::decay<F>::type

Definition at line 506 of file jsonipc.hh.

Member Function Documentation

◆ arg_from_json()

template<typename F >
template<size_t INDEX>
static ConvertType< INDEX > Jsonipc::CallTraits< F >::arg_from_json ( const CallbackInfo args)
static

Definition at line 518 of file jsonipc.hh.

◆ call_unpacked()

template<typename F >
template<typename T , size_t ... INDICES>
static FunctionTraits< F >::ReturnType Jsonipc::CallTraits< F >::call_unpacked ( T &  obj,
const F &  func,
const CallbackInfo args,
std::index_sequence< INDICES... >   
)
static

Definition at line 523 of file jsonipc.hh.

Member Data Documentation

◆ HAS_THIS

template<typename F >
constexpr const bool Jsonipc::CallTraits< F >::HAS_THIS
staticconstexpr

Definition at line 508 of file jsonipc.hh.

◆ N_ARGS

template<typename F >
constexpr const size_t Jsonipc::CallTraits< F >::N_ARGS
staticconstexpr

Definition at line 509 of file jsonipc.hh.


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