proxygen
folly::Formatter< containerMode, Args > Class Template Reference

#include <Format.h>

Inheritance diagram for folly::Formatter< containerMode, Args >:
folly::BaseFormatter< Formatter< containerMode, Args... >, containerMode, Args... >

Private Member Functions

 Formatter (StringPiece &str, Args &&...args)
 
template<size_t K, class Callback >
void doFormatArg (FormatArg &arg, Callback &cb) const
 

Friends

class BaseFormatter< Formatter< containerMode, Args... >, containerMode, Args... >
 
template<class... A>
Formatter< false, A... > format (StringPiece fmt, A &&...arg)
 
template<class C >
Formatter< true, Cvformat (StringPiece fmt, C &&container)
 

Additional Inherited Members

- Public Types inherited from folly::BaseFormatter< Formatter< containerMode, Args... >, containerMode, Args... >
typedef detail::FormatterTag IsFormatter
 
typedef BaseFormatter BaseType
 
- Public Member Functions inherited from folly::BaseFormatter< Formatter< containerMode, Args... >, containerMode, Args... >
void operator() (Output &out) const
 
std::enable_if< IsSomeString< Str >::value >::type appendTo (Str &str) const
 
std::string str () const
 
fbstring fbstr () const
 

Detailed Description

template<bool containerMode, class... Args>
class folly::Formatter< containerMode, Args >

Definition at line 40 of file Format.h.

Constructor & Destructor Documentation

template<bool containerMode, class... Args>
folly::Formatter< containerMode, Args >::Formatter ( StringPiece str,
Args &&...  args 
)
inlineexplicitprivate

Definition at line 215 of file Format.h.

References testing::Args().

216  : BaseFormatter<
217  Formatter<containerMode, Args...>,
218  containerMode,
219  Args...>(str, std::forward<Args>(args)...) {
220  static_assert(
221  !containerMode || sizeof...(Args) == 1,
222  "Exactly one argument required in container mode");
223  }
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
Formatter(StringPiece &str, Args &&...args)
Definition: Format.h:215

Member Function Documentation

template<bool containerMode, class... Args>
template<size_t K, class Callback >
void folly::Formatter< containerMode, Args >::doFormatArg ( FormatArg arg,
Callback &  cb 
) const
inlineprivate

Definition at line 226 of file Format.h.

References testing::Args(), and folly::format().

226  {
227  this->template getFormatValue<K>().format(arg, cb);
228  }
friend Formatter< false, A... > format(StringPiece fmt, A &&...arg)

Friends And Related Function Documentation

template<bool containerMode, class... Args>
friend class BaseFormatter< Formatter< containerMode, Args... >,containerMode,Args... >
friend

Definition at line 233 of file Format.h.

template<bool containerMode, class... Args>
template<class... A>
Formatter<false, A...> format ( StringPiece  fmt,
A &&...  arg 
)
friend
template<bool containerMode, class... Args>
template<class C >
Formatter<true, C> vformat ( StringPiece  fmt,
C &&  container 
)
friend

The documentation for this class was generated from the following file: