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

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

`#include <strconv.hxx>`

## Public Member Functions

void | from_string (const char Str[], short &Obj)
std::string | to_string (short Obj)
void | from_string (const char Str[], unsigned short &Obj)
std::string | to_string (unsigned short Obj)
void | from_string (const char Str[], int &Obj)
std::string | to_string (int Obj)
void | from_string (const char Str[], unsigned int &Obj)
std::string | to_string (unsigned int Obj)
void | from_string (const char Str[], long &Obj)
std::string | to_string (long Obj)
void | from_string (const char Str[], unsigned long &Obj)
std::string | to_string (unsigned long Obj)
void | from_string (const char Str[], long long &Obj)
std::string | to_string (long long Obj)
void | from_string (const char Str[], unsigned long long &Obj)
std::string | to_string (unsigned long long Obj)
void | from_string (const char Str[], float &Obj)
std::string | to_string (float Obj)
void | from_string (const char Str[], double &Obj)
std::string | to_string (double Obj)
void | from_string (const char Str[], long double &Obj)
std::string | to_string (long double Obj)
void | from_string (const char Str[], bool &Obj)
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]

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

## from_string() [2/13]

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

## from_string() [3/13]

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

## from_string() [4/13]

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

## from_string() [5/13]

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

## from_string() [6/13]

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

## from_string() [7/13]

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

## from_string() [8/13]

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

## from_string() [9/13]

template<typename TYPE >

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

static

## from_string() [10/13]

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

## from_string() [11/13]

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

## from_string() [12/13]

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

## from_string() [13/13]

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

## has_null()

template<typename TYPE >

static constexpr bool pqxx::internal::builtin_traits< TYPE >::has_null | ( |  | ) |

static constexpr noexcept

## 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 | ( |  | ) |

static constexpr noexcept

## null()

template<typename TYPE >

static TYPE pqxx::internal::builtin_traits< TYPE >::null | ( |  | ) |

static

References pqxx::internal::throw_null_conversion().

## to_string() [1/13]

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

## to_string() [2/13]

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

## to_string() [3/13]

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

## to_string() [4/13]

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

## to_string() [5/13]

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

## to_string() [6/13]

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

## to_string() [7/13]

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

## to_string() [8/13]

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

## to_string() [9/13]

template<typename TYPE >

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

static

## to_string() [10/13]

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

## to_string() [11/13]

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

## to_string() [12/13]

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

## to_string() [13/13]

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

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

- strconv.hxx