Classes | Typedefs | Functions
attr.h File Reference
#include "detail/common.h"
#include "cast.h"
#include <functional>
Include dependency graph for attr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  argument_record
 Internal data structure which holds metadata about a keyword argument. More...
 
struct  arithmetic
 Annotation to mark enums as an arithmetic type. More...
 
struct  base< T >
 Annotation indicating that a class derives from another given type. More...
 
struct  buffer_protocol
 Annotation which enables the buffer protocol for a type. More...
 
struct  call_guard< Ts >
 
struct  call_guard< T >
 
struct  call_guard< T, Ts... >
 
struct  call_guard<>
 
struct  custom_type_setup
 
struct  doc
 Annotation for documentation. More...
 
struct  dynamic_attr
 Annotation which enables dynamic attributes, i.e. adds __dict__ to a class. More...
 
struct  function_record
 
struct  is_final
 Annotation for classes that cannot be subclassed. More...
 
struct  is_method
 Annotation for methods. More...
 
struct  is_new_style_constructor
 Tag for a new-style __init__ defined in detail/init.h More...
 
struct  is_operator
 Annotation for operators. More...
 
struct  is_setter
 Annotation for setters. More...
 
struct  keep_alive< Nurse, Patient >
 Keep patient alive while nurse lives. More...
 
struct  metaclass
 Annotation which requests that a special metaclass is created for a type. More...
 
struct  module_local
 Annotation that marks a class as local to the module: More...
 
struct  multiple_inheritance
 Annotation indicating that a class is involved in a multiple inheritance relationship. More...
 
struct  name
 Annotation for function names. More...
 
struct  op_< id, ot, L, R >
 Operator implementation generator. More...
 
struct  prepend
 Mark a function for addition at the beginning of the existing overload chain instead of the end. More...
 
struct  process_attribute< T, SFINAE >
 
struct  process_attribute< arg >
 Process a keyword argument attribute (without a default value) More...
 
struct  process_attribute< arg_v >
 Process a keyword argument attribute (with a default value) More...
 
struct  process_attribute< arithmetic >
 Process an 'arithmetic' attribute for enums (does nothing here) More...
 
struct  process_attribute< base< T > >
 Process a parent class attribute (deprecated, does not support multiple inheritance) More...
 
struct  process_attribute< buffer_protocol >
 
struct  process_attribute< call_guard< Ts... > >
 
struct  process_attribute< char * >
 
struct  process_attribute< const char * >
 Process an attribute specifying the function's docstring (provided as a C-style string) More...
 
struct  process_attribute< custom_type_setup >
 
struct  process_attribute< doc >
 Process an attribute specifying the function's docstring. More...
 
struct  process_attribute< dynamic_attr >
 
struct  process_attribute< is_final >
 
struct  process_attribute< is_method >
 Process an attribute which indicates that this function is a method. More...
 
struct  process_attribute< is_new_style_constructor >
 
struct  process_attribute< is_operator >
 Process an attribute which indicates that this function is an operator. More...
 
struct  process_attribute< is_setter >
 Process an attribute which indicates that this function is a setter. More...
 
struct  process_attribute< keep_alive< Nurse, Patient > >
 
struct  process_attribute< kw_only >
 Process a keyword-only-arguments-follow pseudo argument. More...
 
struct  process_attribute< metaclass >
 
struct  process_attribute< module_local >
 
struct  process_attribute< multiple_inheritance >
 Process a multiple inheritance attribute. More...
 
struct  process_attribute< name >
 Process an attribute specifying the function's name. More...
 
struct  process_attribute< pos_only >
 Process a positional-only-argument maker. More...
 
struct  process_attribute< prepend >
 Process a 'prepend' attribute, putting this at the beginning of the overload chain. More...
 
struct  process_attribute< return_value_policy >
 Process an attribute indicating the function's return value policy. More...
 
struct  process_attribute< scope >
 Process an attribute which indicates the parent scope of a method. More...
 
struct  process_attribute< sibling >
 
struct  process_attribute< T, enable_if_t< is_pyobject< T >::value > >
 
struct  process_attribute_default< T >
 
struct  process_attributes< Args >
 Recursively iterate over variadic template arguments. More...
 
struct  scope
 Annotation for parent scope. More...
 
struct  sibling
 Annotation indicating that a function is an overload associated with a given "sibling". More...
 
struct  call_guard< T, Ts... >::type
 
struct  type_record
 Special data structure which (temporarily) holds metadata about a bound class. More...
 

Typedefs

template<typename... Extra>
using extract_guard_t = typename exactly_one_t< is_call_guard, call_guard<>, Extra... >::type
 Extract the type from the first call_guard in Extras... (or void_type if none found) More...
 
template<typename T >
using is_call_guard = is_instantiation< call_guard, T >
 

Functions

void append_self_arg_if_needed (function_record *r)
 
void check_kw_only_arg (const arg &a, function_record *r)
 
template<typename... Extra, size_t named = constexpr_sum(std::is_base_of<arg, Extra>::value...), size_t self = constexpr_sum(std::is_same<is_method, Extra>::value...)>
constexpr bool expected_num_args (size_t nargs, bool has_args, bool has_kwargs)
 Check the number of named arguments at compile time. More...
 
void keep_alive_impl (size_t Nurse, size_t Patient, function_call &call, handle ret)
 

Typedef Documentation

◆ extract_guard_t

template<typename... Extra>
using extract_guard_t = typename exactly_one_t<is_call_guard, call_guard<>, Extra...>::type

Extract the type from the first call_guard in Extras... (or void_type if none found)

Definition at line 678 of file attr.h.

◆ is_call_guard

template<typename T >
using is_call_guard = is_instantiation<call_guard, T>

Definition at line 674 of file attr.h.

Function Documentation

◆ append_self_arg_if_needed()

void append_self_arg_if_needed ( function_record r)
inline

Definition at line 468 of file attr.h.

◆ check_kw_only_arg()

void check_kw_only_arg ( const arg a,
function_record r 
)
inline

Definition at line 461 of file attr.h.

◆ expected_num_args()

template<typename... Extra, size_t named = constexpr_sum(std::is_base_of<arg, Extra>::value...), size_t self = constexpr_sum(std::is_same<is_method, Extra>::value...)>
constexpr bool expected_num_args ( size_t  nargs,
bool  has_args,
bool  has_kwargs 
)
constexpr

Check the number of named arguments at compile time.

Definition at line 684 of file attr.h.

◆ keep_alive_impl()

void keep_alive_impl ( size_t  Nurse,
size_t  Patient,
function_call call,
handle  ret 
)

Definition at line 2349 of file pybind11.h.



gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:09:45