|
Electroneum
|
Namespaces | |
| anonymous_namespace{format.cc} | |
| internal | |
Classes | |
| struct | AlignSpec |
| struct | AlignTypeSpec |
| class | ArgFormatter |
| struct | ArgJoin |
| class | ArgList |
| class | ArgVisitor |
| class | BasicArgFormatter |
| class | BasicArrayWriter |
| class | BasicCStringRef |
| class | BasicFormatter |
| class | BasicMemoryWriter |
| class | BasicPrintfArgFormatter |
| class | BasicStringRef |
| class | BasicWriter |
| class | Buffer |
| struct | EmptySpec |
| class | FormatError |
| class | FormatInt |
| struct | FormatSpec |
| class | IntFormatSpec |
| class | StrFormatSpec |
| class | SystemError |
| struct | TypeSpec |
| struct | WidthSpec |
Typedefs | |
| typedef BasicWriter< char > | Writer |
| typedef BasicWriter< wchar_t > | WWriter |
| typedef BasicStringRef< char > | StringRef |
| typedef BasicStringRef< wchar_t > | WStringRef |
| typedef BasicCStringRef< char > | CStringRef |
| typedef BasicCStringRef< wchar_t > | WCStringRef |
| typedef BasicMemoryWriter< char > | MemoryWriter |
| typedef BasicMemoryWriter< wchar_t > | WMemoryWriter |
| typedef BasicArrayWriter< char > | ArrayWriter |
| typedef BasicArrayWriter< wchar_t > | WArrayWriter |
Enumerations | |
| enum | Alignment { ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, ALIGN_NUMERIC } |
| enum | { SIGN_FLAG = 1, PLUS_FLAG = 2, MINUS_FLAG = 4, HASH_FLAG = 8, CHAR_FLAG = 0x10 } |
| enum | Color { BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE } |
Functions | |
| FMT_FUNC void | format_system_error (Writer &out, int error_code, StringRef message) FMT_NOEXCEPT |
| FMT_FUNC void | report_system_error (int error_code, fmt::StringRef message) FMT_NOEXCEPT |
| FMT_FUNC void | print (std::FILE *f, CStringRef format_str, ArgList args) |
| FMT_FUNC void | print (CStringRef format_str, ArgList args) |
| FMT_FUNC void | print_colored (Color c, CStringRef format, ArgList args) |
| IntFormatSpec< int, TypeSpec< 'b'> > | bin (int value) |
| IntFormatSpec< int, TypeSpec< 'o'> > | oct (int value) |
| IntFormatSpec< int, TypeSpec< 'x'> > | hex (int value) |
| IntFormatSpec< int, TypeSpec< 'X'> > | hexu (int value) |
| template<char TYPE_CODE, typename Char > | |
| IntFormatSpec< int, AlignTypeSpec< TYPE_CODE >, Char > | pad (int value, unsigned width, Char fill=' ') |
| template<typename Char > | |
| StrFormatSpec< Char > | pad (const Char *str, unsigned width, Char fill=' ') |
| StrFormatSpec< wchar_t > | pad (const wchar_t *str, unsigned width, char fill=' ') |
| std::string | format (CStringRef format_str, ArgList args) |
| std::wstring | format (WCStringRef format_str, ArgList args) |
| template<typename T > | |
| void | format_decimal (char *&buffer, T value) |
| template<typename T > | |
| internal::NamedArgWithType< char, T > | arg (StringRef name, const T &arg) |
| template<typename T > | |
| internal::NamedArgWithType< wchar_t, T > | arg (WStringRef name, const T &arg) |
| template<typename Char > | |
| void | arg (StringRef, const internal::NamedArg< Char > &) FMT_DELETED_OR_UNDEFINED |
| template<typename Char > | |
| void | arg (WStringRef, const internal::NamedArg< Char > &) FMT_DELETED_OR_UNDEFINED |
| template<typename It > | |
| ArgJoin< char, It > | join (It first, It last, const BasicCStringRef< char > &sep) |
| template<typename It > | |
| ArgJoin< wchar_t, It > | join (It first, It last, const BasicCStringRef< wchar_t > &sep) |
| template<typename ArgFormatter , typename Char , typename It > | |
| void | format_arg (fmt::BasicFormatter< Char, ArgFormatter > &f, const Char *&format_str, const ArgJoin< Char, It > &e) |
| FMT_FUNC void | print (std::ostream &os, CStringRef format_str, ArgList args) |
| template<typename Char , typename ArgFormatter_ , typename T > | |
| void | format_arg (BasicFormatter< Char, ArgFormatter_ > &f, const Char *&format_str, const T &value) |
Variables | |
| FMT_GCC_EXTENSION typedef long long | LongLong |
| FMT_GCC_EXTENSION typedef unsigned long long | ULongLong |
| typedef BasicArrayWriter<char> fmt::ArrayWriter |
| typedef BasicCStringRef<char> fmt::CStringRef |
| typedef BasicMemoryWriter<char> fmt::MemoryWriter |
| typedef BasicStringRef<char> fmt::StringRef |
| typedef BasicArrayWriter<wchar_t> fmt::WArrayWriter |
| typedef BasicCStringRef<wchar_t> fmt::WCStringRef |
| typedef BasicMemoryWriter<wchar_t> fmt::WMemoryWriter |
| typedef BasicWriter<char> fmt::Writer |
| typedef BasicStringRef<wchar_t> fmt::WStringRef |
| typedef BasicWriter<wchar_t> fmt::WWriter |
| enum fmt::Alignment |
| enum fmt::Color |
|
inline |
Returns a named argument for formatting functions.
Example**::
print("Elapsed time: {s:.2f} seconds", arg("s", 1.23));
|
inline |
| void fmt::arg | ( | StringRef | , |
| const internal::NamedArg< Char > & | |||
| ) |
| void fmt::arg | ( | WStringRef | , |
| const internal::NamedArg< Char > & | |||
| ) |
| IntFormatSpec<int, TypeSpec<'b'> > fmt::bin | ( | int | value | ) |
Returns an integer format specifier to format the value in base 2.
|
inline |
Formats arguments and returns the result as a string.
Example**::
std::string message = format("The answer is {}", 42);
|
inline |
| void fmt::format_arg | ( | BasicFormatter< Char, ArgFormatter_ > & | f, |
| const Char *& | format_str, | ||
| const T & | value | ||
| ) |
| void fmt::format_arg | ( | fmt::BasicFormatter< Char, ArgFormatter > & | f, |
| const Char *& | format_str, | ||
| const ArgJoin< Char, It > & | e | ||
| ) |
|
inline |
| FMT_API void fmt::format_system_error | ( | fmt::Writer & | out, |
| int | error_code, | ||
| fmt::StringRef | message | ||
| ) |
Formats an error returned by an operating system or a language runtime, for example a file opening error, and writes it to out in the following form:
.. parsed-literal:: <message>*: *<system-message>*
where *<message>* is the passed message and *<system-message>* is the system message corresponding to the error code. error_code* is a system error code as given by errno. If error_code is not a valid error code such as -1, the system message may look like "Unknown error -1" and is platform-dependent.
| IntFormatSpec<int, TypeSpec<'x'> > fmt::hex | ( | int | value | ) |
Returns an integer format specifier to format the value in base 16 using lower-case letters for the digits above 9.
| IntFormatSpec<int, TypeSpec<'X'> > fmt::hexu | ( | int | value | ) |
Returns an integer formatter format specifier to format in base 16 using upper-case letters for the digits above 9.
| ArgJoin<char, It> fmt::join | ( | It | first, |
| It | last, | ||
| const BasicCStringRef< char > & | sep | ||
| ) |
| ArgJoin<wchar_t, It> fmt::join | ( | It | first, |
| It | last, | ||
| const BasicCStringRef< wchar_t > & | sep | ||
| ) |
| IntFormatSpec<int, TypeSpec<'o'> > fmt::oct | ( | int | value | ) |
Returns an integer format specifier to format the value in base 8.
| IntFormatSpec<int, AlignTypeSpec<TYPE_CODE>, Char> fmt::pad | ( | int | value, |
| unsigned | width, | ||
| Char | fill = ' ' |
||
| ) |
Returns an integer format specifier to pad the formatted argument with the fill character to the specified width using the default (right) numeric alignment.
Example**::
MemoryWriter out; out << pad(hex(0xcafe), 8, '0'); out.str() == "0000cafe"
|
inline |
Returns a string formatter that pads the formatted argument with the fill character to the specified width using the default (left) string alignment.
Example**::
std::string s = str(MemoryWriter() << pad("abc", 8)); s == "abc "
|
inline |
| FMT_API void fmt::print | ( | std::ostream & | os, |
| CStringRef | format_str, | ||
| ArgList | args | ||
| ) |
Prints formatted data to the stream os.
Example**::
print(cerr, "Don't {}!", "panic");
| FMT_API void fmt::print | ( | std::FILE * | f, |
| CStringRef | format_str, | ||
| ArgList | args | ||
| ) |
Prints formatted data to the file f.
Example**::
print(stderr, "Don't {}!", "panic");
| FMT_API void fmt::print | ( | CStringRef | format_str, |
| ArgList | args | ||
| ) |
Prints formatted data to stdout.
Example**::
print("Elapsed time: {0:.2f} seconds", 1.23);
| FMT_API void fmt::print_colored | ( | Color | c, |
| CStringRef | format, | ||
| ArgList | args | ||
| ) |
Formats a string and prints it to stdout using ANSI escape sequences to specify color (experimental). Example: print_colored(fmt::RED, "Elapsed time: {0:.2f} seconds", 1.23);
| FMT_API void fmt::report_system_error | ( | int | error_code, |
| fmt::StringRef | message | ||
| ) |
| FMT_GCC_EXTENSION typedef long long fmt::LongLong |
| FMT_GCC_EXTENSION typedef unsigned long long fmt::ULongLong |
1.8.14