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 <cast.h>

Public Types

using CharT = typename StringType::value_type
 

Public Member Functions

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 Public Attributes

static constexpr size_t UTF_N = 8 * sizeof(CharT)
 

Private Member Functions

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)
 

Detailed Description

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

Definition at line 377 of file cast.h.

Member Typedef Documentation

◆ CharT

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

Definition at line 378 of file cast.h.

Member Function Documentation

◆ cast()

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

Definition at line 450 of file cast.h.

◆ decode_utfN()

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

Definition at line 463 of file cast.h.

◆ load()

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

Definition at line 397 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

Definition at line 485 of file cast.h.

◆ 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 511 of file cast.h.

◆ PYBIND11_TYPE_CASTER()

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

Member Data Documentation

◆ UTF_N

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

Definition at line 395 of file cast.h.


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


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