μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
duration_caster< type > Class Template Reference

#include </builds/ipbus/ipbus-software/uhal/python/pybind11-python2/include/pybind11/chrono.h>

Inheritance diagram for duration_caster< type >:
[legend]

Public Types

using rep = typename type::rep
 
using period = typename type::period
 
using days = std::chrono::duration< int_least32_t, std::ratio< 86400 > >
 
using rep = typename type::rep
 
using period = typename type::period
 
using days = std::chrono::duration< int_least32_t, std::ratio< 86400 > >
 

Public Member Functions

bool load (handle src, bool)
 
 PYBIND11_TYPE_CASTER (type, const_name("datetime.timedelta"))
 
bool load (handle src, bool)
 
 PYBIND11_TYPE_CASTER (type, const_name("datetime.timedelta"))
 

Static Public Member Functions

static const std::chrono::duration< rep, period > & get_duration (const std::chrono::duration< rep, period > &src)
 
template<typename Clock >
static std::chrono::duration< rep, periodget_duration (const std::chrono::time_point< Clock, std::chrono::duration< rep, period > > &src)
 
static handle cast (const type &src, return_value_policy, handle)
 
static const std::chrono::duration< rep, period > & get_duration (const std::chrono::duration< rep, period > &src)
 
template<typename Clock >
static std::chrono::duration< rep, periodget_duration (const std::chrono::time_point< Clock, std::chrono::duration< rep, period > > &src)
 
static handle cast (const type &src, return_value_policy, handle)
 

Detailed Description

template<typename type>
class duration_caster< type >

Definition at line 36 of file chrono.h.

Member Typedef Documentation

◆ days [1/2]

template<typename type >
using duration_caster< type >::days = std::chrono::duration<int_least32_t, std::ratio<86400> >

Definition at line 42 of file chrono.h.

◆ days [2/2]

template<typename type >
using duration_caster< type >::days = std::chrono::duration<int_least32_t, std::ratio<86400> >

Definition at line 31 of file chrono.h.

◆ period [1/2]

template<typename type >
using duration_caster< type >::period = typename type::period

Definition at line 39 of file chrono.h.

◆ period [2/2]

template<typename type >
using duration_caster< type >::period = typename type::period

Definition at line 28 of file chrono.h.

◆ rep [1/2]

template<typename type >
using duration_caster< type >::rep = typename type::rep

Definition at line 38 of file chrono.h.

◆ rep [2/2]

template<typename type >
using duration_caster< type >::rep = typename type::rep

Definition at line 27 of file chrono.h.

Member Function Documentation

◆ cast() [1/2]

template<typename type >
static handle duration_caster< type >::cast ( const type src,
return_value_policy  ,
handle   
)
inlinestatic

Definition at line 85 of file chrono.h.

References duration_caster< type >::get_duration().

◆ cast() [2/2]

template<typename type >
static handle duration_caster< type >::cast ( const type src,
return_value_policy  ,
handle   
)
inlinestatic

Definition at line 74 of file chrono.h.

References duration_caster< type >::get_duration().

◆ get_duration() [1/4]

template<typename type >
static const std::chrono::duration< rep, period > & duration_caster< type >::get_duration ( const std::chrono::duration< rep, period > &  src)
inlinestatic

Definition at line 74 of file chrono.h.

Referenced by duration_caster< type >::cast().

◆ get_duration() [2/4]

template<typename type >
static const std::chrono::duration< rep, period > & duration_caster< type >::get_duration ( const std::chrono::duration< rep, period > &  src)
inlinestatic

Definition at line 63 of file chrono.h.

◆ get_duration() [3/4]

template<typename type >
template<typename Clock >
static std::chrono::duration< rep, period > duration_caster< type >::get_duration ( const std::chrono::time_point< Clock, std::chrono::duration< rep, period > > &  src)
inlinestatic

Definition at line 81 of file chrono.h.

◆ get_duration() [4/4]

template<typename type >
template<typename Clock >
static std::chrono::duration< rep, period > duration_caster< type >::get_duration ( const std::chrono::time_point< Clock, std::chrono::duration< rep, period > > &  src)
inlinestatic

Definition at line 70 of file chrono.h.

◆ load() [1/2]

template<typename type >
bool duration_caster< type >::load ( handle  src,
bool   
)
inline

◆ load() [2/2]

template<typename type >
bool duration_caster< type >::load ( handle  src,
bool   
)
inline

◆ PYBIND11_TYPE_CASTER() [1/2]

template<typename type >
duration_caster< type >::PYBIND11_TYPE_CASTER ( type  ,
const_name("datetime.timedelta")   
)

References const_name().

◆ PYBIND11_TYPE_CASTER() [2/2]

template<typename type >
duration_caster< type >::PYBIND11_TYPE_CASTER ( type  ,
const_name("datetime.timedelta")   
)

References const_name().


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