VLink  2.3.0
A high-performance communication middleware
vlink::format::detail Namespace Reference

Classes

struct  IsOutputIteratorImpl
 
struct  IsOutputIteratorImpl< TypeT, std::enable_if_t< std::is_assignable_v< decltype(*std::declval< TypeT & >()++), char > > >
 
struct  IsOutputIteratorImpl< char * >
 
struct  IsOutputIteratorImpl< TypeT[NumT]>
 
struct  TypeConstant
 
struct  TypeConstant< signed char >
 
struct  TypeConstant< unsigned char >
 
struct  TypeConstant< short >
 
struct  TypeConstant< unsigned short >
 
struct  TypeConstant< int >
 
struct  TypeConstant< unsigned >
 
struct  TypeConstant< long >
 
struct  TypeConstant< unsigned long >
 
struct  TypeConstant< long long >
 
struct  TypeConstant< unsigned long long >
 
struct  TypeConstant< bool >
 
struct  TypeConstant< char >
 
struct  TypeConstant< float >
 
struct  TypeConstant< double >
 
struct  TypeConstant< long double >
 
struct  TypeConstant< std::nullptr_t >
 
struct  TypeConstant< const char * >
 
struct  TypeConstant< char * >
 
struct  TypeConstant< std::string_view >
 
struct  TypeConstant< std::string >
 
struct  TypeConstant< char[NumT]>
 
struct  TypeConstant< const char[NumT]>
 
struct  TypeConstant< T * >
 
struct  HasFormatAs
 
struct  HasFormatAs< TypeT, std::void_t< decltype(format_as(std::declval< const TypeT & >()))> >
 
struct  FormatSpec
 
class  StringWriter
 
class  IteratorWriter
 
class  Value
 
class  FormatArg
 
struct  FormatArgStore
 
class  BasicFormatArgs
 
class  FormatWriter
 

Typedefs

template<typename TypeT >
using RemoveCvref = typename std::remove_cv_t< std::remove_reference_t< TypeT > >
 
using FormatArgs = BasicFormatArgs< char >
 

Enumerations

enum class  Type : uint8_t {
  kNone , kInt , kUint , kLongLong ,
  kUlongLong , kBool , kChar , kFloat ,
  kDouble , kLongDouble , kString , kCstring ,
  kPointer
}
 
enum class  Align : uint8_t { kNone , kLeft , kRight , kCenter }
 
enum class  Sign : uint8_t { kMinus , kPlus , kSpace }
 

Functions

VLINK_EXPORT size_t format_uint_to (char *buf, unsigned value) noexcept
 
VLINK_EXPORT size_t format_int_to (char *buf, int value) noexcept
 
VLINK_EXPORT size_t format_ulong_long_to (char *buf, unsigned long long value) noexcept
 
VLINK_EXPORT size_t format_long_long_to (char *buf, long long value) noexcept
 
VLINK_EXPORT size_t format_pointer_to (char *buf, const void *ptr) noexcept
 
VLINK_EXPORT size_t format_float_to (char *buf, size_t buflen, float value) noexcept
 
VLINK_EXPORT size_t format_double_to (char *buf, size_t buflen, double value) noexcept
 
VLINK_EXPORT size_t format_long_double_to (char *buf, size_t buflen, long double value) noexcept
 
VLINK_EXPORT size_t format_double_spec_to (char *buf, size_t buflen, double value, char type, int precision, bool alt) noexcept
 
VLINK_EXPORT size_t format_long_double_spec_to (char *buf, size_t buflen, long double value, char type, int precision, bool alt) noexcept
 
VLINK_EXPORT const char * parse_spec_ref (const char *p, const char *end, int &ref) noexcept
 
VLINK_EXPORT const char * parse_format_spec (const char *p, const char *end, FormatSpec &spec) noexcept
 
VLINK_EXPORT size_t format_base_digits_to (char(&buf)[64], unsigned long long value, unsigned base_bits, bool upper) noexcept
 
template<typename UIntT >
int count_digits (UIntT n) noexcept
 
template<typename UIntT >
void write_int_digits (char *buf, UIntT value, int num_digits) noexcept
 

Variables

template<typename TypeT >
constexpr bool kIsOutputIterator = IsOutputIteratorImpl<TypeT>::value
 
constexpr int kSpecRefNone = -1
 
constexpr int kSpecRefAuto = -2
 

Typedef Documentation

◆ FormatArgs

◆ RemoveCvref

template<typename TypeT >
using vlink::format::detail::RemoveCvref = typedef typename std::remove_cv_t<std::remove_reference_t<TypeT> >

Enumeration Type Documentation

◆ Align

enum vlink::format::detail::Align : uint8_t
strong
Enumerator
kNone 
kLeft 
kRight 
kCenter 

◆ Sign

enum vlink::format::detail::Sign : uint8_t
strong
Enumerator
kMinus 
kPlus 
kSpace 

◆ Type

enum vlink::format::detail::Type : uint8_t
strong
Enumerator
kNone 
kInt 
kUint 
kLongLong 
kUlongLong 
kBool 
kChar 
kFloat 
kDouble 
kLongDouble 
kString 
kCstring 
kPointer 

Function Documentation

◆ count_digits()

template<typename UIntT >
int vlink::format::detail::count_digits ( UIntT  n)
inlinenoexcept
Here is the caller graph for this function:

◆ format_base_digits_to()

size_t vlink::format::detail::format_base_digits_to ( char(&)  buf[64],
unsigned long long  value,
unsigned  base_bits,
bool  upper 
)
inlinenoexcept

◆ format_double_spec_to()

VLINK_EXPORT size_t vlink::format::detail::format_double_spec_to ( char *  buf,
size_t  buflen,
double  value,
char  type,
int  precision,
bool  alt 
)
noexcept

◆ format_double_to()

VLINK_EXPORT size_t vlink::format::detail::format_double_to ( char *  buf,
size_t  buflen,
double  value 
)
noexcept

◆ format_float_to()

VLINK_EXPORT size_t vlink::format::detail::format_float_to ( char *  buf,
size_t  buflen,
float  value 
)
noexcept

◆ format_int_to()

size_t vlink::format::detail::format_int_to ( char *  buf,
int  value 
)
inlinenoexcept
Here is the call graph for this function:

◆ format_long_double_spec_to()

VLINK_EXPORT size_t vlink::format::detail::format_long_double_spec_to ( char *  buf,
size_t  buflen,
long double  value,
char  type,
int  precision,
bool  alt 
)
noexcept

◆ format_long_double_to()

VLINK_EXPORT size_t vlink::format::detail::format_long_double_to ( char *  buf,
size_t  buflen,
long double  value 
)
noexcept

◆ format_long_long_to()

size_t vlink::format::detail::format_long_long_to ( char *  buf,
long long  value 
)
inlinenoexcept
Here is the call graph for this function:

◆ format_pointer_to()

VLINK_EXPORT size_t vlink::format::detail::format_pointer_to ( char *  buf,
const void *  ptr 
)
noexcept

◆ format_uint_to()

size_t vlink::format::detail::format_uint_to ( char *  buf,
unsigned  value 
)
inlinenoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ format_ulong_long_to()

size_t vlink::format::detail::format_ulong_long_to ( char *  buf,
unsigned long long  value 
)
inlinenoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_format_spec()

VLINK_EXPORT const char* vlink::format::detail::parse_format_spec ( const char *  p,
const char *  end,
FormatSpec &  spec 
)
noexcept
Here is the caller graph for this function:

◆ parse_spec_ref()

VLINK_EXPORT const char* vlink::format::detail::parse_spec_ref ( const char *  p,
const char *  end,
int &  ref 
)
noexcept

◆ write_int_digits()

template<typename UIntT >
void vlink::format::detail::write_int_digits ( char *  buf,
UIntT  value,
int  num_digits 
)
inlinenoexcept
Here is the caller graph for this function:

Variable Documentation

◆ kIsOutputIterator

template<typename TypeT >
constexpr bool vlink::format::detail::kIsOutputIterator = IsOutputIteratorImpl<TypeT>::value
inlineconstexpr

◆ kSpecRefAuto

constexpr int vlink::format::detail::kSpecRefAuto = -2
inlineconstexpr

◆ kSpecRefNone

constexpr int vlink::format::detail::kSpecRefNone = -1
inlineconstexpr