Ruby: ruby::backward::cxxanyargs::define_method::driver< T, F >::engine< N, U > Struct Template Reference

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

Static Public Member Functions
ruby::backward::cxxanyargs::define_method::driver< T, F >::engine< N, U > Struct Template Reference

Defines a method. More...

`#include <cxxanyargs.hpp>`

## Static Public Member Functions
static void | define (VALUE klass, T mid, type func)
| Defines klass#mid as func, whose arity is N.
static void | define (VALUE klass, T mid, U func)
| Defines klass#mid as func, whose arity is N.
static void | define (VALUE klass, T mid, notimpl_type func)
| Defines klass#mid as func, whose arity is N.

## Detailed Description

template<typename T, void(*)(VALUE klass, T mid, type *func, int arity) F>
template<int N, typename U>
struct ruby::backward::cxxanyargs::define_method::driver< T, F >::engine< N, U >

Defines a method.

Template Parameters

  N | Arity of the function.
  U | The function in question

Definition at line 529 of file cxxanyargs.hpp.

## Member Function Documentation

## ◆ define() [1/3]

template<typename T , void(*)(VALUE klass, T mid, type *func, int arity) F>
template<int N, typename U >

static void ruby::backward::cxxanyargs::define_method::driver< T, F >::engine< N, U >::define | ( | VALUE | klass,
|  | T | mid,
|  | notimpl_type | func )
| inlinestatic

Defines klass#mid as func, whose arity is N.

Parameters

  [in] | klass | Where the method lives.
  [in] | mid | Name of the method to define.
  [in] | func | Function that implements klass#mid.

Definition at line 563 of file cxxanyargs.hpp.

## ◆ define() [2/3]

template<typename T , void(*)(VALUE klass, T mid, type *func, int arity) F>
template<int N, typename U >

static void ruby::backward::cxxanyargs::define_method::driver< T, F >::engine< N, U >::define | ( | VALUE | klass,
|  | T | mid,
|  | type | func )
| inlinestatic

Defines klass#mid as func, whose arity is N.

Parameters

  [in] | klass | Where the method lives.
  [in] | mid | Name of the method to define.
  [in] | func | Function that implements klass#mid.

Deprecated
  Pass correctly typed function instead.

Definition at line 546 of file cxxanyargs.hpp.

## ◆ define() [3/3]

template<typename T , void(*)(VALUE klass, T mid, type *func, int arity) F>
template<int N, typename U >

static void ruby::backward::cxxanyargs::define_method::driver< T, F >::engine< N, U >::define | ( | VALUE | klass,
|  | T | mid,
|  | U | func )
| inlinestatic

Defines klass#mid as func, whose arity is N.

Parameters

  [in] | klass | Where the method lives.
  [in] | mid | Name of the method to define.
  [in] | func | Function that implements klass#mid.

Definition at line 556 of file cxxanyargs.hpp.

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

- include/ruby/backward/cxxanyargs.hpp