Scarab  v2.11.1
Project 8 C++ Utility Library
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
duration_caster< type > Class Template Reference

#include <chrono.h>

Inheritance diagram for duration_caster< type >:
Inheritance graph

Public Types

typedef type::rep rep
 
typedef type::period period
 
typedef std::chrono::duration< uint_fast32_t, std::ratio< 86400 > > days
 
template<typename T_ >
using cast_op_type = pybind11::detail::movable_cast_op_type< T_ >
 

Public Member Functions

bool load (handle src, bool)
 
 operator type * ()
 
 operator type & ()
 
 operator type && () &&
 

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)
 
template<typename T_ , enable_if_t< std::is_same< type, remove_cv_t< T_ >>::value, int > = 0>
static handle cast (T_ *src, return_value_policy policy, handle parent)
 

Static Public Attributes

static constexpr auto name = _("datetime.timedelta")
 

Protected Attributes

type value
 

Detailed Description

template<typename type>
class pybind11::detail::duration_caster< type >

Definition at line 33 of file chrono.h.

Member Typedef Documentation

◆ cast_op_type

Definition at line 95 of file chrono.h.

◆ days

typedef std::chrono::duration<uint_fast32_t, std::ratio<86400> > days

Definition at line 38 of file chrono.h.

◆ period

typedef type::period period

Definition at line 36 of file chrono.h.

◆ rep

typedef type::rep rep

Definition at line 35 of file chrono.h.

Member Function Documentation

◆ cast() [1/2]

static handle cast ( const type src,
return_value_policy  ,
handle   
)
inlinestatic

Definition at line 73 of file chrono.h.

◆ cast() [2/2]

static handle cast ( T_ *  src,
return_value_policy  policy,
handle  parent 
)
inlinestatic

Definition at line 95 of file chrono.h.

◆ get_duration() [1/2]

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

Definition at line 64 of file chrono.h.

◆ get_duration() [2/2]

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

Definition at line 69 of file chrono.h.

◆ load()

bool load ( handle  src,
bool   
)
inline

Definition at line 40 of file chrono.h.

◆ operator type &()

operator type & ( )
inline

Definition at line 95 of file chrono.h.

◆ operator type &&()

operator type && ( ) &&
inline

Definition at line 95 of file chrono.h.

◆ operator type *()

operator type * ( )
inline

Definition at line 95 of file chrono.h.

Member Data Documentation

◆ name

constexpr auto name = _("datetime.timedelta")
static

Definition at line 95 of file chrono.h.

◆ value

type value
protected

Definition at line 95 of file chrono.h.


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