libpqxx
pqxx::internal::builtin_traits< TYPE > Struct Template Reference

Helper: string traits implementation for built-in types. More...

#include <strconv.hxx>

Public Member Functions

template<>
void from_string (const char Str[], short &Obj)
 
template<>
std::string to_string (short Obj)
 
template<>
void from_string (const char Str[], unsigned short &Obj)
 
template<>
std::string to_string (unsigned short Obj)
 
template<>
void from_string (const char Str[], int &Obj)
 
template<>
std::string to_string (int Obj)
 
template<>
void from_string (const char Str[], unsigned int &Obj)
 
template<>
std::string to_string (unsigned int Obj)
 
template<>
void from_string (const char Str[], long &Obj)
 
template<>
std::string to_string (long Obj)
 
template<>
void from_string (const char Str[], unsigned long &Obj)
 
template<>
std::string to_string (unsigned long Obj)
 
template<>
void from_string (const char Str[], long long &Obj)
 
template<>
std::string to_string (long long Obj)
 
template<>
void from_string (const char Str[], unsigned long long &Obj)
 
template<>
std::string to_string (unsigned long long Obj)
 
template<>
void from_string (const char Str[], float &Obj)
 
template<>
std::string to_string (float Obj)
 
template<>
void from_string (const char Str[], double &Obj)
 
template<>
std::string to_string (double Obj)
 
template<>
void from_string (const char Str[], long double &Obj)
 
template<>
std::string to_string (long double Obj)
 
template<>
void from_string (const char Str[], bool &Obj)
 
template<>
std::string to_string (bool Obj)
 

Static Public Member Functions

static constexpr const char * name () noexcept
 
static constexpr bool has_null () noexcept
 
static bool is_null (TYPE)
 
static TYPE null ()
 
static void from_string (const char Str[], TYPE &Obj)
 
static std::string to_string (TYPE Obj)
 

Detailed Description

template<typename TYPE>
struct pqxx::internal::builtin_traits< TYPE >

Helper: string traits implementation for built-in types.

These types all look much alike, so they can share much of their traits classes (though templatised, of course).

The actual to_string and from_string are implemented in the library, but the rest is defined inline.

Member Function Documentation

◆ from_string() [1/13]

template<typename TYPE >
static void pqxx::internal::builtin_traits< TYPE >::from_string ( const char  Str[],
TYPE &  Obj 
)
static

◆ from_string() [2/13]

template<>
void pqxx::internal::builtin_traits< short >::from_string ( const char  Str[],
short &  Obj 
)

◆ from_string() [3/13]

template<>
void pqxx::internal::builtin_traits< unsigned short >::from_string ( const char  Str[],
unsigned short &  Obj 
)

◆ from_string() [4/13]

template<>
void pqxx::internal::builtin_traits< int >::from_string ( const char  Str[],
int &  Obj 
)

◆ from_string() [5/13]

template<>
void pqxx::internal::builtin_traits< unsigned int >::from_string ( const char  Str[],
unsigned int &  Obj 
)

◆ from_string() [6/13]

template<>
void pqxx::internal::builtin_traits< long >::from_string ( const char  Str[],
long &  Obj 
)

◆ from_string() [7/13]

template<>
void pqxx::internal::builtin_traits< unsigned long >::from_string ( const char  Str[],
unsigned long &  Obj 
)

◆ from_string() [8/13]

template<>
void pqxx::internal::builtin_traits< long long >::from_string ( const char  Str[],
long long &  Obj 
)

◆ from_string() [9/13]

template<>
void pqxx::internal::builtin_traits< unsigned long long >::from_string ( const char  Str[],
unsigned long long &  Obj 
)

◆ from_string() [10/13]

template<>
void pqxx::internal::builtin_traits< float >::from_string ( const char  Str[],
float &  Obj 
)

◆ from_string() [11/13]

template<>
void pqxx::internal::builtin_traits< double >::from_string ( const char  Str[],
double &  Obj 
)

◆ from_string() [12/13]

template<>
void pqxx::internal::builtin_traits< long double >::from_string ( const char  Str[],
long double &  Obj 
)

◆ from_string() [13/13]

template<>
void pqxx::internal::builtin_traits< bool >::from_string ( const char  Str[],
bool &  Obj 
)

References pqxx::from_string().

◆ has_null()

template<typename TYPE >
static constexpr bool pqxx::internal::builtin_traits< TYPE >::has_null ( )
staticnoexcept

◆ is_null()

template<typename TYPE >
static bool pqxx::internal::builtin_traits< TYPE >::is_null ( TYPE  )
static

◆ name()

template<typename TYPE >
static constexpr const char* pqxx::internal::builtin_traits< TYPE >::name ( )
staticnoexcept

◆ null()

template<typename TYPE >
static TYPE pqxx::internal::builtin_traits< TYPE >::null ( )
static

◆ to_string() [1/13]

template<typename TYPE >
static std::string pqxx::internal::builtin_traits< TYPE >::to_string ( TYPE  Obj)
static

◆ to_string() [2/13]

template<>
std::string pqxx::internal::builtin_traits< short >::to_string ( short  Obj)

◆ to_string() [3/13]

template<>
std::string pqxx::internal::builtin_traits< unsigned short >::to_string ( unsigned short  Obj)

◆ to_string() [4/13]

template<>
std::string pqxx::internal::builtin_traits< int >::to_string ( int  Obj)

◆ to_string() [5/13]

template<>
std::string pqxx::internal::builtin_traits< unsigned int >::to_string ( unsigned int  Obj)

◆ to_string() [6/13]

template<>
std::string pqxx::internal::builtin_traits< long >::to_string ( long  Obj)

◆ to_string() [7/13]

template<>
std::string pqxx::internal::builtin_traits< unsigned long >::to_string ( unsigned long  Obj)

◆ to_string() [8/13]

template<>
std::string pqxx::internal::builtin_traits< long long >::to_string ( long long  Obj)

◆ to_string() [9/13]

template<>
std::string pqxx::internal::builtin_traits< unsigned long long >::to_string ( unsigned long long  Obj)

◆ to_string() [10/13]

template<>
std::string pqxx::internal::builtin_traits< float >::to_string ( float  Obj)

◆ to_string() [11/13]

template<>
std::string pqxx::internal::builtin_traits< double >::to_string ( double  Obj)

◆ to_string() [12/13]

template<>
std::string pqxx::internal::builtin_traits< long double >::to_string ( long double  Obj)

◆ to_string() [13/13]

template<>
std::string pqxx::internal::builtin_traits< bool >::to_string ( bool  Obj)

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