Rcpp Version 0.12.12
tinyformat Namespace Reference

Namespaces

 detail
 

Classes

class  FormatList
 

Typedefs

typedef const FormatListFormatListRef
 Reference to type-opaque format list for passing to vformat() More...
 

Functions

template<typename T >
void formatValue (std::ostream &out, const char *, const char *fmtEnd, int ntrunc, const T &value)
 
detail::FormatListN< 0 > makeFormatList ()
 
void vformat (std::ostream &out, const char *fmt, FormatListRef list)
 
void format (std::ostream &out, const char *fmt)
 
std::string format (const char *fmt)
 
void printf (const char *fmt)
 
void printfln (const char *fmt)
 

Typedef Documentation

Reference to type-opaque format list for passing to vformat()

Definition at line 857 of file tinyformat.h.

Function Documentation

void tinyformat::format ( std::ostream &  out,
const char *  fmt 
)
inline

Definition at line 986 of file tinyformat.h.

References makeFormatList(), and vformat().

Referenced by format(), printf(), printfln(), Rcpp::stop(), vformat(), and Rcpp::warning().

Here is the call graph for this function:

std::string tinyformat::format ( const char *  fmt)
inline

Definition at line 991 of file tinyformat.h.

References format().

Here is the call graph for this function:

template<typename T >
void tinyformat::formatValue ( std::ostream &  out,
const char *  ,
const char *  fmtEnd,
int  ntrunc,
const T &  value 
)
inline

Format a value into a stream, delegating to operator<< by default.

Users may override this for their own types. When this function is called, the stream flags will have been modified according to the format string. The format specification is provided in the range [fmtBegin, fmtEnd). For truncating conversions, ntrunc is set to the desired maximum number of characters, for example "%.7s" calls formatValue with ntrunc = 7.

By default, formatValue() uses the usual stream insertion operator operator<< to format the type T, with special cases for the c and p conversions.

Definition at line 314 of file tinyformat.h.

References tinyformat::detail::formatTruncated().

Referenced by tinyformat::detail::FormatArg::formatImpl().

Here is the call graph for this function:

detail::FormatListN<0> tinyformat::makeFormatList ( )
inline
void tinyformat::printf ( const char *  fmt)
inline

Definition at line 998 of file tinyformat.h.

References format().

Referenced by vformat().

Here is the call graph for this function:

void tinyformat::printfln ( const char *  fmt)
inline

Definition at line 1003 of file tinyformat.h.

References format().

Referenced by vformat().

Here is the call graph for this function:

void tinyformat::vformat ( std::ostream &  out,
const char *  fmt,
FormatListRef  list 
)
inline

Format list of arguments to the stream according to the given format string.

The name vformat() is chosen for the semantic similarity to vprintf(): the list of format arguments is held in a single function argument.

Definition at line 944 of file tinyformat.h.

References format(), tinyformat::detail::formatImpl(), tinyformat::FormatList::m_formatters, tinyformat::FormatList::m_N, makeFormatList(), printf(), and printfln().

Referenced by format(), and tinyformat::FormatList::FormatList().

Here is the call graph for this function: