HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
printf.h File Reference
#include <algorithm>
#include <limits>
#include "ostream.h"
+ Include dependency graph for printf.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  internal::int_checker< IsSigned >
 
struct  internal::int_checker< true >
 
class  internal::printf_precision_handler
 
class  internal::is_zero_int
 
struct  internal::make_unsigned_or_bool< T >
 
struct  internal::make_unsigned_or_bool< bool >
 
class  internal::arg_converter< T, Context >
 
class  internal::char_converter< Context >
 
class  internal::printf_width_handler< Char >
 
class  printf_arg_formatter< Range >
 
class  basic_printf_context< OutputIt, Char, ArgFormatter >
 
class  printf_arg_formatter< Range >
 
struct  printf_formatter< T >
 
class  basic_printf_context< OutputIt, Char, ArgFormatter >
 
struct  basic_printf_context< OutputIt, Char, ArgFormatter >::formatter_type< T >
 
struct  basic_printf_context_t< Buffer >
 

Namespaces

 internal
 

Typedefs

typedef basic_printf_context_t
< internal::buffer >::type 
printf_context
 
typedef basic_printf_context_t
< internal::wbuffer >::type 
wprintf_context
 
typedef basic_format_args
< printf_context
printf_args
 
typedef basic_format_args
< wprintf_context
wprintf_args
 
typedef internal::basic_buffer
< FMT_CHAR(S)> 
buffer
 
typedef basic_printf_context_t
< buffer >::type 
context
 

Functions

template<typename T , typename Context , typename Char >
void internal::convert_arg (basic_format_arg< Context > &arg, Char type)
 
template<typename Char , typename Context >
void printf (internal::basic_buffer< Char > &buf, basic_string_view< Char > format, basic_format_args< Context > args)
 
template<typename... Args>
format_arg_store
< printf_context, Args...> 
make_printf_args (const Args &...args)
 
template<typename... Args>
format_arg_store
< wprintf_context, Args...> 
make_wprintf_args (const Args &...args)
 
template<typename S , typename Char = FMT_CHAR(S)>
std::basic_string< Char > vsprintf (const S &format, basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type > args)
 
template<typename S , typename... Args>
 FMT_ENABLE_IF_STRING (S, std::basic_string< FMT_CHAR(S)>) sprintf(const S &format
 
return vsprintf (to_string_view(format), basic_format_args< context >(as))
 
template<typename S , typename Char = FMT_CHAR(S)>
int vfprintf (std::FILE *f, const S &format, basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type > args)
 
template<typename S , typename... Args>
 FMT_ENABLE_IF_STRING (S, int) fprintf(std
 
template<typename S , typename Char = FMT_CHAR(S)>
int vprintf (const S &format, basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type > args)
 
return vprintf (to_string_view(format_str), basic_format_args< context >(as))
 
template<typename S , typename Char = FMT_CHAR(S)>
int vfprintf (std::basic_ostream< Char > &os, const S &format, basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type > args)
 

Variables

const Args & args
 
format_arg_store< context, Args...> as { args... }
 

Typedef Documentation

Definition at line 630 of file printf.h.

Definition at line 584 of file printf.h.

Definition at line 581 of file printf.h.

Definition at line 585 of file printf.h.

Function Documentation

template<typename S , typename... Args>
FMT_ENABLE_IF_STRING ( ,
std::basic_string< FMT_CHAR(S)>   
) const
inline

Formats arguments and returns the result as a string.

Example**::

std::string message = fmt::sprintf("The answer is %d", 42);

template<typename S , typename... Args>
FMT_ENABLE_IF_STRING ( ,
int   
)
inline

Prints formatted data to the file f.

Example**::

fmt::fprintf(stderr, "Don't %s!", "panic");

Prints formatted data to stdout.

Example**::

fmt::printf("Elapsed time: %.2f seconds", 1.23);

Prints formatted data to the stream os.

Example**::

fmt::fprintf(cerr, "Don't %s!", "panic");

Definition at line 658 of file printf.h.

template<typename... Args>
format_arg_store<printf_context, Args...> make_printf_args ( const Args &...  args)
inline

Constructs an ~fmtformat_arg_store object that contains references to arguments and can be implicitly converted to ~fmtprintf_args.

Definition at line 595 of file printf.h.

template<typename... Args>
format_arg_store<wprintf_context, Args...> make_wprintf_args ( const Args &...  args)
inline

Constructs an ~fmtformat_arg_store object that contains references to arguments and can be implicitly converted to ~fmtwprintf_args.

Definition at line 605 of file printf.h.

template<typename Char , typename Context >
void printf ( internal::basic_buffer< Char > &  buf,
basic_string_view< Char >  format,
basic_format_args< Context >  args 
)
template<typename S , typename Char = FMT_CHAR(S)>
int vfprintf ( std::FILE *  f,
const S &  format,
basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type args 
)
inline

Definition at line 638 of file printf.h.

template<typename S , typename Char = FMT_CHAR(S)>
int vfprintf ( std::basic_ostream< Char > &  os,
const S &  format,
basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type args 
)
inline

Definition at line 696 of file printf.h.

template<typename S , typename Char = FMT_CHAR(S)>
int vprintf ( const S &  format,
basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type args 
)
inline

Definition at line 669 of file printf.h.

return vprintf ( to_string_view(format_str)  ,
basic_format_args< context as 
)
template<typename S , typename Char = FMT_CHAR(S)>
std::basic_string<Char> vsprintf ( const S &  format,
basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type args 
)
inline

Definition at line 609 of file printf.h.

return vsprintf ( to_string_view(format ,
basic_format_args< context as 
)

Variable Documentation

format_arg_store< context, Args...> as { args... }

Definition at line 632 of file printf.h.