μ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 | Static Public Attributes | Private Member Functions | Static Private Member Functions | List of all members
string_caster< StringType, IsView > Struct Template Reference

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

Inheritance diagram for string_caster< StringType, IsView >:
[legend]

Public Types

using CharT = typename StringType::value_type
 
using CharT = typename StringType::value_type
 

Public Member Functions

bool load (handle src, bool)
 
 PYBIND11_TYPE_CASTER (StringType, const_name(PYBIND11_STRING_NAME))
 
bool load (handle src, bool)
 
 PYBIND11_TYPE_CASTER (StringType, const_name(PYBIND11_STRING_NAME))
 

Static Public Member Functions

static handle cast (const StringType &src, return_value_policy, handle)
 
static handle cast (const StringType &src, return_value_policy, handle)
 

Static Public Attributes

static constexpr size_t UTF_N = 8 * sizeof(CharT)
 

Private Member Functions

template<typename C = CharT>
bool load_bytes (enable_if_t< std::is_same< C, char >::value, handle > src)
 
template<typename C = CharT>
bool load_bytes (enable_if_t<!std::is_same< C, char >::value, handle >)
 
template<typename C = CharT>
bool load_raw (enable_if_t< std::is_same< C, char >::value, handle > src)
 
template<typename C = CharT>
bool load_raw (enable_if_t<!std::is_same< C, char >::value, handle >)
 

Static Private Member Functions

static handle decode_utfN (const char *buffer, ssize_t nbytes)
 
static handle decode_utfN (const char *buffer, ssize_t nbytes)
 

Detailed Description

template<typename StringType, bool IsView = false>
struct string_caster< StringType, IsView >

Definition at line 361 of file cast.h.

Member Typedef Documentation

◆ CharT [1/2]

template<typename StringType , bool IsView = false>
using string_caster< StringType, IsView >::CharT = typename StringType::value_type

Definition at line 362 of file cast.h.

◆ CharT [2/2]

template<typename StringType , bool IsView = false>
using string_caster< StringType, IsView >::CharT = typename StringType::value_type

Definition at line 366 of file cast.h.

Member Function Documentation

◆ cast() [1/2]

template<typename StringType , bool IsView = false>
static handle string_caster< StringType, IsView >::cast ( const StringType &  src,
return_value_policy  ,
handle   
)
inlinestatic

Definition at line 456 of file cast.h.

References string_caster< StringType, IsView >::decode_utfN().

◆ cast() [2/2]

template<typename StringType , bool IsView = false>
static handle string_caster< StringType, IsView >::cast ( const StringType &  src,
return_value_policy  ,
handle   
)
inlinestatic

Definition at line 438 of file cast.h.

References string_caster< StringType, IsView >::decode_utfN().

◆ decode_utfN() [1/2]

template<typename StringType , bool IsView = false>
static handle string_caster< StringType, IsView >::decode_utfN ( const char *  buffer,
ssize_t  nbytes 
)
inlinestaticprivate

◆ decode_utfN() [2/2]

template<typename StringType , bool IsView = false>
static handle string_caster< StringType, IsView >::decode_utfN ( const char *  buffer,
ssize_t  nbytes 
)
inlinestaticprivate

Definition at line 451 of file cast.h.

References string_caster< StringType, IsView >::UTF_N.

◆ load() [1/2]

template<typename StringType , bool IsView = false>
bool string_caster< StringType, IsView >::load ( handle  src,
bool   
)
inline

◆ load() [2/2]

template<typename StringType , bool IsView = false>
bool string_caster< StringType, IsView >::load ( handle  src,
bool   
)
inline

◆ load_bytes() [1/2]

template<typename StringType , bool IsView = false>
template<typename C = CharT>
bool string_caster< StringType, IsView >::load_bytes ( enable_if_t< std::is_same< C, char >::value, handle src)
inlineprivate

◆ load_bytes() [2/2]

template<typename StringType , bool IsView = false>
template<typename C = CharT>
bool string_caster< StringType, IsView >::load_bytes ( enable_if_t<!std::is_same< C, char >::value, handle )
inlineprivate

Definition at line 506 of file cast.h.

◆ load_raw() [1/2]

template<typename StringType , bool IsView = false>
template<typename C = CharT>
bool string_caster< StringType, IsView >::load_raw ( enable_if_t< std::is_same< C, char >::value, handle src)
inlineprivate

◆ load_raw() [2/2]

template<typename StringType , bool IsView = false>
template<typename C = CharT>
bool string_caster< StringType, IsView >::load_raw ( enable_if_t<!std::is_same< C, char >::value, handle )
inlineprivate

Definition at line 499 of file cast.h.

◆ PYBIND11_TYPE_CASTER() [1/2]

template<typename StringType , bool IsView = false>
string_caster< StringType, IsView >::PYBIND11_TYPE_CASTER ( StringType  ,
const_name(PYBIND11_STRING_NAME  
)

References const_name().

◆ PYBIND11_TYPE_CASTER() [2/2]

template<typename StringType , bool IsView = false>
string_caster< StringType, IsView >::PYBIND11_TYPE_CASTER ( StringType  ,
const_name(PYBIND11_STRING_NAME  
)

References const_name().

Member Data Documentation

◆ UTF_N

template<typename StringType , bool IsView = false>
static constexpr size_t string_caster< StringType, IsView >::UTF_N = 8 * sizeof(CharT)
staticconstexpr

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