rapidyaml 0.15.2
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches
c4::fmt Namespace Reference

Classes

struct  boolalpha_
struct  integral_
 format an integral type with a custom radix More...
struct  integral_padded_
 format an integral type with a custom radix, and pad with zeroes on the left More...
struct  overflow_checked_
struct  real_
struct  raw_wrapper_
struct  left_
struct  center_
struct  right_

Typedefs

using const_raw_wrapper = raw_wrapper_<cbyte>
using raw_wrapper = raw_wrapper_<byte>
using const_base64_wrapper = detail::base64_wrapper_<cbyte>
 a tag type to mark a payload to be encoded as base64
using base64_wrapper = detail::base64_wrapper_<byte>
 a tag type to mark a payload to be decoded as base64
template<class Container>
using const_base64_container_wrapper = detail::base64_container_wrapper_<const Container, cbyte>
 a tag type to mark a payload as base64-encoded
template<class Container>
using base64_container_wrapper = detail::base64_container_wrapper_<Container, byte>
 a tag type to mark a payload to be encoded as base64

Functions

template<class T>
boolalpha_ boolalpha (T const &val=false)
 tag function to mark a variable to be written as an alphabetic boolean, ie as either true or false
template<class T>
integral_< T > integral (T val, T radix=10)
 format an integral type with a custom radix
template<class T>
integral_< intptr_t > integral (T const *val, T radix=10)
 format an integral type with a custom radix
template<class T>
integral_< intptr_t > integral (std::nullptr_t, T radix=10)
 format an integral type with a custom radix
template<class T>
integral_< intptr_t > hex (T *v)
 format the pointer as an hexadecimal value
template<class T>
integral_< intptr_t > hex (T const *v)
 format the pointer as an hexadecimal value
template<class T>
integral_< T > hex (T v)
template<class T>
integral_< intptr_t > oct (T const *v)
 format the pointer as an octal value
template<class T>
integral_< intptr_t > oct (T *v)
 format the pointer as an octal value
template<class T>
integral_< T > oct (T v)
 format the integral_ argument as an octal value
template<class T>
integral_< intptr_t > bin (T const *v)
 format the pointer as a binary 0-1 value
template<class T>
integral_< intptr_t > bin (T *v)
 format the pointer as a binary 0-1 value
template<class T>
integral_< T > bin (T v)
 format the integral_ argument as a binary 0-1 value
template<class T>
integral_padded_< T > zpad (T val, size_t num_digits)
 pad the argument with zeroes on the left, with decimal radix
template<class T>
integral_padded_< T > zpad (integral_< T > val, size_t num_digits)
 pad the argument with zeroes on the left
integral_padded_< intptr_t > zpad (std::nullptr_t, size_t num_digits)
 pad the argument with zeroes on the left
template<class T>
integral_padded_< intptr_t > zpad (T const *val, size_t num_digits)
 pad the argument with zeroes on the left
template<class T>
integral_padded_< intptr_t > zpad (T *val, size_t num_digits)
template<class T>
overflow_checked_< T > overflow_checked (T &val)
template<class T>
real_< T > real (T val, int precision, RealFormat_e fmt=FTOA_FLOAT)
const_raw_wrapper craw (cblob data, size_t alignment=alignof(max_align_t))
 mark a variable to be written in raw binary format, using memcpy
const_raw_wrapper raw (cblob data, size_t alignment=alignof(max_align_t))
 mark a variable to be written in raw binary format, using memcpy
template<class T>
const_raw_wrapper craw (T const &data, size_t alignment=alignof(T))
 mark a variable to be written in raw binary format, using memcpy
template<class T>
const_raw_wrapper raw (T const &data, size_t alignment=alignof(T))
 mark a variable to be written in raw binary format, using memcpy
raw_wrapper raw (blob data, size_t alignment=alignof(max_align_t))
 mark a variable to be read in raw binary format, using memcpy
template<class T>
raw_wrapper raw (T &data, size_t alignment=alignof(T))
 mark a variable to be read in raw binary format, using memcpy
template<class T>
left_< T > left (T val, size_t width, char padchar=' ')
 tag type to mark an argument to be aligned left.
template<class T>
center_< T > center (T val, size_t width, char padchar=' ')
 tag function to mark an argument to be aligned center
template<class T>
right_< T > right (T val, size_t width, char padchar=' ')
 tag function to mark an argument to be aligned right
const_base64_wrapper cbase64 (csubstr s, size_t *reqsize=nullptr)
 a tag function to mark a csubstr payload to be encoded in base64 format
const_base64_wrapper base64 (csubstr s, size_t *reqsize=nullptr)
 a tag function to mark a csubstr payload to be encoded in base64 format
base64_wrapper base64 (substr s, size_t *reqsize=nullptr)
 a tag function to mark a variable to be decoded from base64
template<class T>
const_base64_wrapper cbase64 (T const *arg, size_t sz, size_t *reqsize=nullptr)
 a tag function to mark a payload to be encoded in base64 format
template<class T>
auto base64 (T *arg, size_t sz, size_t *reqsize=nullptr) -> typename std::conditional< std::is_const< typename std::remove_reference< typename std::remove_pointer< T >::type >::type >::value, const_base64_wrapper, base64_wrapper >::type
 a tag function to mark a payload to be encoded in base64 format
template<class T>
auto cbase64 (T const &arg, size_t *reqsize=nullptr) -> typename std::enable_if< ! detail::has_resize< T >::value, const_base64_wrapper >::type
 a tag function to mark a payload to be encoded in base64 format
template<class T>
auto base64 (T &arg, size_t *reqsize=nullptr) -> typename std::enable_if< ! detail::has_resize< T >::value, typename std::conditional< std::is_const< typename std::remove_reference< typename std::remove_pointer< T >::type >::type >::value, const_base64_wrapper, base64_wrapper >::type >::type
 a tag function to mark a payload to be encoded or decoded in base64 format
template<class T>
auto cbase64 (T const &arg, size_t *reqsize=nullptr) -> typename std::enable_if< detail::has_resize< T >::value, const_base64_container_wrapper< T > >::type
 a tag function to mark a container (payload with a .resize() method) to be encoded in base64 format.
template<class T>
auto base64 (T &arg, size_t *reqsize=nullptr) -> typename std::enable_if< detail::has_resize< T >::value, typename std::conditional< std::is_const< typename std::remove_reference< typename std::remove_pointer< T >::type >::type >::value, const_base64_container_wrapper< T >, base64_container_wrapper< T > >::type >::type
 a tag function to mark a container (payload with a .resize() method) to be encoded or decoded in base64 format.

Variables

integral_< intptr_t > hex (std::nullptr_t)
 format null as an hexadecimal value
integral_< intptr_t > oct (std::nullptr_t)
 format null as an octal value
integral_< intptr_t > bin (std::nullptr_t)
 format null as a binary 0-1 value