Internal data structure which holds metadata about a bound function (signature, overloads, etc.) More...
#include </builds/ipbus/ipbus-software/uhal/python/pybind11-python2/include/pybind11/attr.h>
Public Member Functions | |
function_record () | |
function_record () | |
Public Attributes | |
char * | name = nullptr |
Function name. More... | |
char * | doc = nullptr |
char * | signature = nullptr |
Human-readable version of the function signature. More... | |
std::vector< argument_record > | args |
List of registered keyword arguments. More... | |
handle(* | impl )(function_call &) = nullptr |
Pointer to lambda function which converts arguments and performs the actual call. More... | |
void * | data [3] = {} |
Storage for the wrapped function pointer and captured data, if any. More... | |
void(* | free_data )(function_record *ptr) = nullptr |
Pointer to custom destructor for 'data' (if needed) More... | |
return_value_policy | policy = return_value_policy::automatic |
Return value policy associated with this function. More... | |
bool | is_constructor: 1 |
True if name == 'init'. More... | |
bool | is_new_style_constructor: 1 |
True if this is a new-style __init__ defined in detail/init.h More... | |
bool | is_stateless: 1 |
True if this is a stateless function pointer. More... | |
bool | is_operator: 1 |
True if this is an operator (add), etc. More... | |
bool | is_method: 1 |
True if this is a method. More... | |
bool | has_args: 1 |
True if the function has a '*args' argument. More... | |
bool | has_kwargs: 1 |
True if the function has a '**kwargs' argument. More... | |
bool | prepend: 1 |
True if this function is to be inserted at the beginning of the overload resolution chain. More... | |
std::uint16_t | nargs |
Number of arguments (including py::args and/or py::kwargs, if present) More... | |
std::uint16_t | nargs_pos = 0 |
Number of leading positional arguments, which are terminated by a py::args or py::kwargs argument or by a py::kw_only annotation. More... | |
std::uint16_t | nargs_pos_only = 0 |
Number of leading arguments (counted in nargs ) that are positional-only. More... | |
PyMethodDef * | def = nullptr |
Python method object. More... | |
handle | scope |
Python handle to the parent scope (a class or a module) More... | |
handle | sibling |
Python handle to the sibling function representing an overload chain. More... | |
function_record * | next = nullptr |
Pointer to next overload. More... | |
Internal data structure which holds metadata about a bound function (signature, overloads, etc.)
std::vector< argument_record > function_record::args |
List of registered keyword arguments.
Definition at line 204 of file attr.h.
Referenced by append_self_arg_if_needed(), check_kw_only_arg(), process_attribute< arg >::init(), process_attribute< arg_v >::init(), process_attribute< kw_only >::init(), and process_attribute< pos_only >::init().
void * function_record::data = {} |
Storage for the wrapped function pointer and captured data, if any.
Definition at line 210 of file attr.h.
Referenced by type_caster< std::function< Return(Args...)> >::load().
PyMethodDef * function_record::def = nullptr |
char * function_record::doc = nullptr |
Definition at line 198 of file attr.h.
Referenced by process_attribute< const char * >::init(), and process_attribute< doc >::init().
void(* function_record::free_data)(function_record *ptr) = nullptr |
bool function_record::has_args |
True if the function has a '*args' argument.
Definition at line 234 of file attr.h.
Referenced by process_attribute< kw_only >::init().
bool function_record::has_kwargs |
handle(* function_record::impl)(function_call &) = nullptr |
bool function_record::is_constructor |
True if name == 'init'.
Definition at line 219 of file attr.h.
Referenced by cpp_function::dispatcher().
bool function_record::is_method |
True if this is a method.
Definition at line 231 of file attr.h.
Referenced by append_self_arg_if_needed(), process_attribute< arg_v >::init(), and process_attribute< is_method >::init().
bool function_record::is_new_style_constructor |
True if this is a new-style __init__
defined in detail/init.h
Definition at line 222 of file attr.h.
Referenced by process_attribute< is_new_style_constructor >::init().
bool function_record::is_operator |
True if this is an operator (add), etc.
Definition at line 228 of file attr.h.
Referenced by cpp_function::dispatcher(), and process_attribute< is_operator >::init().
bool function_record::is_stateless |
True if this is a stateless function pointer.
Definition at line 225 of file attr.h.
Referenced by type_caster< std::function< Return(Args...)> >::load().
char * function_record::name = nullptr |
Function name.
Definition at line 195 of file attr.h.
Referenced by cpp_function::dispatcher(), process_attribute< arg_v >::init(), and process_attribute< name >::init().
std::uint16_t function_record::nargs |
Number of arguments (including py::args and/or py::kwargs, if present)
Definition at line 243 of file attr.h.
Referenced by function_call::function_call().
std::uint16_t function_record::nargs_pos = 0 |
Number of leading positional arguments, which are terminated by a py::args or py::kwargs argument or by a py::kw_only annotation.
Definition at line 247 of file attr.h.
Referenced by check_kw_only_arg(), process_attribute< kw_only >::init(), and process_attribute< pos_only >::init().
std::uint16_t function_record::nargs_pos_only = 0 |
Number of leading arguments (counted in nargs
) that are positional-only.
Definition at line 250 of file attr.h.
Referenced by process_attribute< pos_only >::init().
function_record * function_record::next = nullptr |
Pointer to next overload.
Definition at line 262 of file attr.h.
Referenced by cpp_function::dispatcher(), and type_caster< std::function< Return(Args...)> >::load().
return_value_policy function_record::policy = return_value_policy::automatic |
Return value policy associated with this function.
Definition at line 216 of file attr.h.
Referenced by process_attribute< return_value_policy >::init().
bool function_record::prepend |
True if this function is to be inserted at the beginning of the overload resolution chain.
Definition at line 240 of file attr.h.
Referenced by process_attribute< prepend >::init().
handle function_record::scope |
Python handle to the parent scope (a class or a module)
Definition at line 256 of file attr.h.
Referenced by cpp_function::dispatcher(), process_attribute< arg_v >::init(), process_attribute< is_method >::init(), and process_attribute< scope >::init().
handle function_record::sibling |
Python handle to the sibling function representing an overload chain.
Definition at line 259 of file attr.h.
Referenced by process_attribute< sibling >::init().
char * function_record::signature = nullptr |