TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
fmt::internal Namespace Reference

Classes

struct  Arg
 
struct  ArgArray
 
struct  ArgArray< N, false >
 
struct  ArgArray< N, true >
 
class  ArgFormatterBase
 
class  ArgMap
 
struct  ArgType
 
class  ArgVisitor
 
class  BasicArgFormatter
 
class  BasicCharTraits
 
struct  BasicData
 
singleton  CharTraits
 
class  CharTraits< char >
 
class  CharTraits< wchar_t >
 
struct  Conditional
 
struct  Conditional< false, T, F >
 
struct  ConvertToInt
 
struct  ConvertToIntImpl
 
struct  ConvertToIntImpl2
 
struct  ConvertToIntImpl2< T, true >
 
struct  ConvertToIntImpl< T, true >
 
struct  DummyInt
 
struct  DummyStream
 
struct  EnableIf
 
struct  EnableIf< true, T >
 
class  FixedBuffer
 
class  FormatBuf
 
class  FormatterBase
 
struct  IntTraits
 
class  MakeArg
 
struct  MakeUnsigned
 
class  MakeValue
 
class  MemoryBuffer
 
struct  NamedArg
 
struct  Not
 
struct  Not< false >
 
struct  Null
 
singleton  PrintfArgFormatter
 
class  PrintfFormatter
 
class  RuntimeError
 
struct  SignChecker
 
struct  SignChecker< false >
 
struct  TypeSelector
 
struct  TypeSelector< false >
 
struct  Value
 
struct  WCharHelper
 
struct  WCharHelper< T, wchar_t >
 

Typedefs

typedef std::numeric_limits
< fmt::internal::DummyInt
FPUtil
 
typedef BasicData Data
 
typedef char Yes [1]
 
typedef char No [2]
 

Enumerations

enum  { INLINE_BUFFER_SIZE = 500 }
 

Functions

DummyInt signbit (...)
 
DummyInt _ecvt_s (...)
 
DummyInt isinf (...)
 
DummyInt _finite (...)
 
DummyInt isnan (...)
 
DummyInt _isnan (...)
 
template<typename T >
check (T value)
 
 FMT_SPECIALIZE_MAKE_UNSIGNED (char, unsigned char)
 
 FMT_SPECIALIZE_MAKE_UNSIGNED (signed char, unsigned char)
 
 FMT_SPECIALIZE_MAKE_UNSIGNED (short, unsigned short)
 
 FMT_SPECIALIZE_MAKE_UNSIGNED (int, unsigned)
 
 FMT_SPECIALIZE_MAKE_UNSIGNED (long, unsigned long)
 
 FMT_SPECIALIZE_MAKE_UNSIGNED (LongLong, ULongLong)
 
template<typename Int >
MakeUnsigned< Int >::Type to_unsigned (Int value)
 
template<typename T >
T * make_ptr (T *ptr, std::size_t)
 
template<typename T >
bool is_negative (T value)
 
FMT_API void report_unknown_type (char code, const char *type)
 
unsigned count_digits (uint64_t n)
 
template<typename UInt , typename Char >
void format_decimal (Char *buffer, UInt value, unsigned num_digits)
 
FMT_API void format_system_error (fmt::Writer &out, int error_code, fmt::StringRef message) FMT_NOEXCEPT
 
Yesconvert (fmt::ULongLong)
 
Yesconvert (std::ostream &)
 
Noconvert (...)
 
template<typename T >
T & get ()
 
Nooperator<< (std::ostream &, int)
 
 FMT_DISABLE_CONVERSION_TO_INT (float)
 
 FMT_DISABLE_CONVERSION_TO_INT (double)
 
 FMT_DISABLE_CONVERSION_TO_INT (long double)
 
uint64_t make_type ()
 
template<typename T >
uint64_t make_type (const T &arg)
 
uint64_t make_type (FMT_GEN15(FMT_ARG_TYPE_DEFAULT))
 
template<typename Char >
bool is_name_start (Char c)
 
template<typename Char >
unsigned parse_nonnegative_int (const Char *&s)
 
void require_numeric_argument (const Arg &arg, char spec)
 
template<typename Char >
void check_sign (const Char *&s, const Arg &arg)
 

Typedef Documentation

typedef std::numeric_limits<fmt::internal::DummyInt> fmt::internal::FPUtil
typedef char fmt::internal::No[2]
typedef char fmt::internal::Yes[1]

Enumeration Type Documentation

anonymous enum
Enumerator
INLINE_BUFFER_SIZE 
561 { INLINE_BUFFER_SIZE = 500 };
Definition: format.h:561

Function Documentation

DummyInt fmt::internal::_ecvt_s (   ...)
inline
296 { return DummyInt(); }
Definition: format.h:287

+ Here is the caller graph for this function:

DummyInt fmt::internal::_finite (   ...)
inline
298 { return DummyInt(); }
Definition: format.h:287

+ Here is the caller graph for this function:

DummyInt fmt::internal::_isnan (   ...)
inline
300 { return DummyInt(); }
Definition: format.h:287

+ Here is the caller graph for this function:

template<typename T >
T fmt::internal::check ( value)
inline
305 { return value; }
const FieldDescriptor value
Definition: descriptor.h:1522

+ Here is the caller graph for this function:

template<typename Char >
void fmt::internal::check_sign ( const Char *&  s,
const Arg arg 
)
3467  {
3468  char sign = static_cast<char>(*s);
3469  require_numeric_argument(arg, sign);
3470  if (arg.type == Arg::UINT || arg.type == Arg::ULONG_LONG) {
3471  FMT_THROW(FormatError(fmt::format(
3472  "format specifier '{}' requires signed argument", sign)));
3473  }
3474  ++s;
3475 }
void format(BasicFormatter< Char > &f, const Char *&format_str, const T &value)
Definition: format.h:2963
void require_numeric_argument(const Arg &arg, char spec)
Definition: format.h:3458
Type type
Definition: format.h:984
#define FMT_THROW(x)
Definition: format.h:166
double sign(double fValue)
Definition: g3dmath.h:669

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Yes& fmt::internal::convert ( fmt::ULongLong  )

+ Here is the caller graph for this function:

Yes& fmt::internal::convert ( std::ostream &  )
No& fmt::internal::convert (   ...)

+ Here is the caller graph for this function:

unsigned fmt::internal::count_digits ( uint64_t  n)
inline
844  {
845  unsigned count = 1;
846  for (;;) {
847  // Integer division is slow so do it for a group of four digits instead
848  // of for every digit. The idea comes from the talk by Alexandrescu
849  // "Three Optimization Tips for C++". See speed-test for a comparison.
850  if (n < 10) return count;
851  if (n < 100) return count + 1;
852  if (n < 1000) return count + 2;
853  if (n < 10000) return count + 3;
854  n /= 10000u;
855  count += 4;
856  }
857 }

+ Here is the caller graph for this function:

fmt::internal::FMT_DISABLE_CONVERSION_TO_INT ( float  )
fmt::internal::FMT_DISABLE_CONVERSION_TO_INT ( double  )
fmt::internal::FMT_DISABLE_CONVERSION_TO_INT ( long  double)
fmt::internal::FMT_SPECIALIZE_MAKE_UNSIGNED ( char  ,
unsigned  char 
)
fmt::internal::FMT_SPECIALIZE_MAKE_UNSIGNED ( signed  char,
unsigned  char 
)
fmt::internal::FMT_SPECIALIZE_MAKE_UNSIGNED ( short  ,
unsigned  short 
)
fmt::internal::FMT_SPECIALIZE_MAKE_UNSIGNED ( int  ,
unsigned   
)
fmt::internal::FMT_SPECIALIZE_MAKE_UNSIGNED ( long  ,
unsigned  long 
)
fmt::internal::FMT_SPECIALIZE_MAKE_UNSIGNED ( LongLong  ,
ULongLong   
)
template<typename UInt , typename Char >
void fmt::internal::format_decimal ( Char buffer,
UInt  value,
unsigned  num_digits 
)
inline
870  {
871  buffer += num_digits;
872  while (value >= 100) {
873  // Integer division is slow so do it for a group of two digits instead
874  // of for every digit. The idea comes from the talk by Alexandrescu
875  // "Three Optimization Tips for C++". See speed-test for a comparison.
876  unsigned index = static_cast<unsigned>((value % 100) * 2);
877  value /= 100;
878  *--buffer = Data::DIGITS[index + 1];
879  *--buffer = Data::DIGITS[index];
880  }
881  if (value < 10) {
882  *--buffer = static_cast<char>('0' + value);
883  return;
884  }
885  unsigned index = static_cast<unsigned>(value * 2);
886  *--buffer = Data::DIGITS[index + 1];
887  *--buffer = Data::DIGITS[index];
888 }
const FieldDescriptor value
Definition: descriptor.h:1522
FMT_API void fmt::internal::format_system_error ( fmt::Writer out,
int  error_code,
fmt::StringRef  message 
)
template<typename T >
T& fmt::internal::get ( )

+ Here is the caller graph for this function:

template<typename Char >
bool fmt::internal::is_name_start ( Char  c)
inline
3432  {
3433  return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || '_' == c;
3434 }

+ Here is the caller graph for this function:

template<typename T >
bool fmt::internal::is_negative ( value)
inline
801  {
803 }
bool is_negative(T value)
Definition: format.h:801
Definition: format.h:787
const FieldDescriptor value
Definition: descriptor.h:1522

+ Here is the caller graph for this function:

DummyInt fmt::internal::isinf (   ...)
inline
297 { return DummyInt(); }
Definition: format.h:287

+ Here is the caller graph for this function:

DummyInt fmt::internal::isnan (   ...)
inline
299 { return DummyInt(); }
Definition: format.h:287
template<typename T >
T* fmt::internal::make_ptr ( T *  ptr,
std::size_t   
)
inline
571 { return ptr; }

+ Here is the caller graph for this function:

uint64_t fmt::internal::make_type ( )
inline
1953 { return 0; }
template<typename T >
uint64_t fmt::internal::make_type ( const T &  arg)
inline
1956  {
1957  return MakeValue< BasicFormatter<char> >::type(arg);
1958 }
void arg(WStringRef, const internal::NamedArg< Char > &) FMT_DELETED_OR_UNDEFINED
Definition: format.h:1088
uint64_t fmt::internal::make_type ( FMT_GEN15(FMT_ARG_TYPE_DEFAULT )
inline
2004  {
2005  return t0.type | (t1.type << 4) | (t2.type << 8) | (t3.type << 12) |
2006  (t4.type << 16) | (t5.type << 20) | (t6.type << 24) | (t7.type << 28) |
2007  (t8.type << 32) | (t9.type << 36) | (t10.type << 40) | (t11.type << 44) |
2008  (t12.type << 48) | (t13.type << 52) | (t14.type << 56);
2009 }
No& fmt::internal::operator<< ( std::ostream &  ,
int   
)
template<typename Char >
unsigned fmt::internal::parse_nonnegative_int ( const Char *&  s)
3439  {
3440  assert('0' <= *s && *s <= '9');
3441  unsigned value = 0;
3442  do {
3443  unsigned new_value = value * 10 + (*s++ - '0');
3444  // Check if value wrapped around.
3445  if (new_value < value) {
3447  break;
3448  }
3449  value = new_value;
3450  } while ('0' <= *s && *s <= '9');
3451  // Convert to unsigned to prevent a warning.
3452  unsigned max_int = (std::numeric_limits<int>::max)();
3453  if (value > max_int)
3454  FMT_THROW(FormatError("number is too big"));
3455  return value;
3456 }
T max(const T &x, const T &y)
Definition: g3dmath.h:320
const FieldDescriptor value
Definition: descriptor.h:1522
#define FMT_THROW(x)
Definition: format.h:166

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FMT_API void fmt::internal::report_unknown_type ( char  code,
const char *  type 
)

+ Here is the caller graph for this function:

void fmt::internal::require_numeric_argument ( const Arg arg,
char  spec 
)
inline
3458  {
3459  if (arg.type > Arg::LAST_NUMERIC_TYPE) {
3460  std::string message =
3461  fmt::format("format specifier '{}' requires numeric argument", spec);
3462  FMT_THROW(fmt::FormatError(message));
3463  }
3464 }
void format(BasicFormatter< Char > &f, const Char *&format_str, const T &value)
Definition: format.h:2963
Definition: format.h:529
Type type
Definition: format.h:984
#define FMT_THROW(x)
Definition: format.h:166

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

DummyInt fmt::internal::signbit (   ...)
inline
295 { return DummyInt(); }
Definition: format.h:287

+ Here is the caller graph for this function:

template<typename Int >
MakeUnsigned<Int>::Type fmt::internal::to_unsigned ( Int  value)
inline
554  {
555  FMT_ASSERT(value >= 0, "negative value");
556  return static_cast<typename MakeUnsigned<Int>::Type>(value);
557 }
T Type
Definition: format.h:539
const FieldDescriptor value
Definition: descriptor.h:1522
#define FMT_ASSERT(condition, message)
Definition: format.h:221

+ Here is the caller graph for this function: