WireCellToolkit
Wire Cell Simulation, Signal Process and Reconstruction Toolki for Liquid Argon Detectors
printf.h File Reference
#include <algorithm>
#include <limits>
#include "ostream.h"
Include dependency graph for printf.h:

Go to the source code of this file.

Classes

class  internal::null_terminating_iterator< Char >
 
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_contextprintf_args
 
typedef basic_format_args< wprintf_contextwprintf_args
 
typedef internal::basic_buffer< FMT_CHAR(S)> buffer
 
typedef basic_printf_context_t< buffer >::type context
 

Functions

template<typename T >
FMT_CONSTEXPR const T * internal::pointer_from (const T *p)
 
template<typename Char >
FMT_CONSTEXPR const Char * internal::pointer_from (null_terminating_iterator< Char > it)
 
template<typename Iterator , typename ErrorHandler >
FMT_CONSTEXPR unsigned internal::parse_nonnegative_int (Iterator &it, ErrorHandler &&eh)
 
template<typename T , typename Context , typename Char >
void internal::convert_arg (basic_format_arg< Context > &arg, Char type)
 
template<typename Char , typename Context >
void internal::printf (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_T (internal::is_string< S >::value, 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_T (internal::is_string< S >::value, 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)
 
template<typename S , typename... Args>
 FMT_ENABLE_IF_T (internal::is_string< S >::value, int) printf(const S &format_str
 
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

◆ buffer

Definition at line 757 of file printf.h.

◆ context

Definition at line 758 of file printf.h.

◆ printf_args

Definition at line 710 of file printf.h.

◆ printf_context

Definition at line 707 of file printf.h.

◆ wprintf_args

Definition at line 711 of file printf.h.

◆ wprintf_context

Definition at line 708 of file printf.h.

Function Documentation

◆ FMT_ENABLE_IF_T() [1/3]

template<typename S , typename... Args>
FMT_ENABLE_IF_T ( internal::is_string< S >::value  ,
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);

Here is the caller graph for this function:

◆ FMT_ENABLE_IF_T() [2/3]

template<typename S , typename... Args>
FMT_ENABLE_IF_T ( internal::is_string< S >::value  ,
int   
)
inline

Prints formatted data to the file f.

Example**::

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

Prints formatted data to the stream os.

Example**::

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

Definition at line 785 of file printf.h.

Here is the call graph for this function:

◆ FMT_ENABLE_IF_T() [3/3]

template<typename S , typename... Args>
FMT_ENABLE_IF_T ( internal::is_string< S >::value  ,
int   
) const &
inline

Prints formatted data to stdout.

Example**::

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

◆ make_printf_args()

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 721 of file printf.h.

◆ make_wprintf_args()

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 731 of file printf.h.

◆ vfprintf() [1/2]

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 765 of file printf.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vfprintf() [2/2]

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 823 of file printf.h.

Here is the call graph for this function:

◆ vprintf() [1/2]

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 796 of file printf.h.

Here is the call graph for this function:

◆ vprintf() [2/2]

return vprintf ( to_string_view(format_str ,
basic_format_args< context as 
)

◆ vsprintf() [1/2]

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 735 of file printf.h.

Here is the call graph for this function:

◆ vsprintf() [2/2]

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

Variable Documentation

◆ args

const Args& args
Initial value:
{
std::enable_if<!is_compile_string< S >::value >::type check_format_string(const S &)
Definition: core.h:1352
std::basic_string< FMT_CHAR(S)> format(const S &format_str, const Args &... args)
Definition: core.h:1454

Definition at line 755 of file printf.h.

◆ as

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

Definition at line 759 of file printf.h.