![]() |
BoB robotics
The Brains on Board robotics library
|
Internal data structure which holds metadata about a bound function (signature, overloads, etc.) More...
#include <attr.h>
Public Attributes | |
| char * | name = nullptr |
| Function name. | |
| char * | doc = nullptr |
| char * | signature = nullptr |
| Human-readable version of the function signature. | |
| std::vector< argument_record > | args |
| List of registered keyword arguments. | |
| handle(* | impl )(function_call &) = nullptr |
| Pointer to lambda function which converts arguments and performs the actual call. | |
| void * | data [3] = { } |
| Storage for the wrapped function pointer and captured data, if any. | |
| void(* | free_data )(function_record *ptr) = nullptr |
| Pointer to custom destructor for 'data' (if needed) | |
| return_value_policy | policy = return_value_policy::automatic |
| Return value policy associated with this function. | |
| bool | is_constructor: 1 |
| True if name == 'init'. | |
| bool | is_new_style_constructor: 1 |
True if this is a new-style __init__ defined in detail/init.h | |
| bool | is_stateless: 1 |
| True if this is a stateless function pointer. | |
| bool | is_operator: 1 |
| True if this is an operator (add), etc. | |
| bool | is_method: 1 |
| True if this is a method. | |
| bool | has_args: 1 |
| True if the function has a '*args' argument. | |
| bool | has_kwargs: 1 |
| True if the function has a '**kwargs' argument. | |
| bool | has_kw_only_args: 1 |
| True once a 'py::kw_only' is encountered (any following args are keyword-only) | |
| bool | prepend: 1 |
| True if this function is to be inserted at the beginning of the overload resolution chain. | |
| std::uint16_t | nargs |
| Number of arguments (including py::args and/or py::kwargs, if present) | |
| std::uint16_t | nargs_kw_only = 0 |
Number of trailing arguments (counted in nargs) that are keyword-only. | |
| std::uint16_t | nargs_pos_only = 0 |
Number of leading arguments (counted in nargs) that are positional-only. | |
| PyMethodDef * | def = nullptr |
| Python method object. | |
| handle | scope |
| Python handle to the parent scope (a class or a module) | |
| handle | sibling |
| Python handle to the sibling function representing an overload chain. | |
| function_record * | next = nullptr |
| Pointer to next overload. | |
Internal data structure which holds metadata about a bound function (signature, overloads, etc.)