Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
map_caster< Type, Key, Value > Struct Template Reference

#include <stl.h>

Public Types

using key_conv = make_caster< Key >
 
using value_conv = make_caster< Value >
 

Public Member Functions

bool load (handle src, bool convert)
 
 PYBIND11_TYPE_CASTER (Type, const_name("dict[")+key_conv::name+const_name(", ")+value_conv::name+const_name("]"))
 

Static Public Member Functions

template<typename T >
static handle cast (T &&src, return_value_policy policy, handle parent)
 

Private Member Functions

void reserve_maybe (const dict &, void *)
 
template<typename T = Type, enable_if_t< has_reserve_method< T >::value, int > = 0>
void reserve_maybe (const dict &d, Type *)
 

Detailed Description

template<typename Type, typename Key, typename Value>
struct map_caster< Type, Key, Value >

Definition at line 107 of file stl.h.

Member Typedef Documentation

◆ key_conv

template<typename Type , typename Key , typename Value >
using map_caster< Type, Key, Value >::key_conv = make_caster<Key>

Definition at line 108 of file stl.h.

◆ value_conv

template<typename Type , typename Key , typename Value >
using map_caster< Type, Key, Value >::value_conv = make_caster<Value>

Definition at line 109 of file stl.h.

Member Function Documentation

◆ cast()

template<typename Type , typename Key , typename Value >
template<typename T >
static handle map_caster< Type, Key, Value >::cast ( T &&  src,
return_value_policy  policy,
handle  parent 
)
inlinestatic

Definition at line 138 of file stl.h.

◆ load()

template<typename Type , typename Key , typename Value >
bool map_caster< Type, Key, Value >::load ( handle  src,
bool  convert 
)
inline

Definition at line 119 of file stl.h.

◆ PYBIND11_TYPE_CASTER()

template<typename Type , typename Key , typename Value >
map_caster< Type, Key, Value >::PYBIND11_TYPE_CASTER ( Type  ,
const_name("dict[")+key_conv::name+const_name(", ")+value_conv::name+const_name("]")   
)

◆ reserve_maybe() [1/2]

template<typename Type , typename Key , typename Value >
void map_caster< Type, Key, Value >::reserve_maybe ( const dict ,
void *   
)
inlineprivate

Definition at line 116 of file stl.h.

◆ reserve_maybe() [2/2]

template<typename Type , typename Key , typename Value >
template<typename T = Type, enable_if_t< has_reserve_method< T >::value, int > = 0>
void map_caster< Type, Key, Value >::reserve_maybe ( const dict d,
Type  
)
inlineprivate

Definition at line 113 of file stl.h.


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


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:18:43