cppyabm  1.0.17
An agent-based library to integrate C++ and Python
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
type_caster_generic Class Reference

#include <cast.h>

Inheritance diagram for type_caster_generic:
type_caster_base< type > type_caster_base< StringType > type_caster_base< T > copyable_holder_caster< type, holder_type, SFINAE > type_caster< type, SFINAE > type_caster< type > type_caster< StringType > copyable_holder_caster< T, std::shared_ptr< T > > type_caster< std::shared_ptr< T > >

Public Member Functions

PYBIND11_NOINLINE type_caster_generic (const std::type_info &type_info)
 
 type_caster_generic (const type_info *typeinfo)
 
bool load (handle src, bool convert)
 
void load_value (value_and_holder &&v_h)
 
bool try_implicit_casts (handle src, bool convert)
 
bool try_direct_conversions (handle src)
 
void check_holder_compat ()
 
PYBIND11_NOINLINE bool try_load_foreign_module_local (handle src)
 
template<typename ThisT >
PYBIND11_NOINLINE bool load_impl (handle src, bool convert)
 

Static Public Member Functions

static PYBIND11_NOINLINE handle cast (const void *_src, return_value_policy policy, handle parent, const detail::type_info *tinfo, void *(*copy_constructor)(const void *), void *(*move_constructor)(const void *), const void *existing_holder=nullptr)
 
static PYBIND11_NOINLINE void * local_load (PyObject *src, const type_info *ti)
 
static PYBIND11_NOINLINE std::pair< const void *, const type_info * > src_and_type (const void *src, const std::type_info &cast_type, const std::type_info *rtti_type=nullptr)
 

Public Attributes

const type_infotypeinfo = nullptr
 
const std::type_info * cpptype = nullptr
 
void * value = nullptr
 

Detailed Description

Definition at line 500 of file cast.h.

Constructor & Destructor Documentation

◆ type_caster_generic() [1/2]

PYBIND11_NOINLINE type_caster_generic::type_caster_generic ( const std::type_info &  type_info)
inline

Definition at line 502 of file cast.h.

◆ type_caster_generic() [2/2]

type_caster_generic::type_caster_generic ( const type_info typeinfo)
inline

Definition at line 505 of file cast.h.

Member Function Documentation

◆ cast()

static PYBIND11_NOINLINE handle type_caster_generic::cast ( const void *  _src,
return_value_policy  policy,
handle  parent,
const detail::type_info *  tinfo,
void *(*)(const void *)  copy_constructor,
void *(*)(const void *)  move_constructor,
const void *  existing_holder = nullptr 
)
inlinestatic

Definition at line 512 of file cast.h.

◆ check_holder_compat()

void type_caster_generic::check_holder_compat ( )
inline

Definition at line 634 of file cast.h.

◆ load()

bool type_caster_generic::load ( handle  src,
bool  convert 
)
inline

Definition at line 508 of file cast.h.

◆ load_impl()

template<typename ThisT >
PYBIND11_NOINLINE bool type_caster_generic::load_impl ( handle  src,
bool  convert 
)
inline

Definition at line 668 of file cast.h.

◆ load_value()

void type_caster_generic::load_value ( value_and_holder &&  v_h)
inline

Definition at line 598 of file cast.h.

◆ local_load()

static PYBIND11_NOINLINE void* type_caster_generic::local_load ( PyObject *  src,
const type_info ti 
)
inlinestatic

Definition at line 636 of file cast.h.

◆ src_and_type()

static PYBIND11_NOINLINE std::pair<const void *, const type_info *> type_caster_generic::src_and_type ( const void *  src,
const std::type_info &  cast_type,
const std::type_info *  rtti_type = nullptr 
)
inlinestatic

Definition at line 752 of file cast.h.

◆ try_direct_conversions()

bool type_caster_generic::try_direct_conversions ( handle  src)
inline

Definition at line 627 of file cast.h.

◆ try_implicit_casts()

bool type_caster_generic::try_implicit_casts ( handle  src,
bool  convert 
)
inline

Definition at line 617 of file cast.h.

◆ try_load_foreign_module_local()

PYBIND11_NOINLINE bool type_caster_generic::try_load_foreign_module_local ( handle  src)
inline

Try to load with foreign typeinfo, if available. Used when there is no native typeinfo, or when the native one wasn't able to produce a value.

Definition at line 645 of file cast.h.

Member Data Documentation

◆ cpptype

const std::type_info* type_caster_generic::cpptype = nullptr

Definition at line 766 of file cast.h.

◆ typeinfo

const type_info* type_caster_generic::typeinfo = nullptr

Definition at line 765 of file cast.h.

◆ value

void* type_caster_generic::value = nullptr

Definition at line 767 of file cast.h.


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