proxygen
TestExtendingFormatter< containerMode, Args > Class Template Reference
Inheritance diagram for TestExtendingFormatter< containerMode, Args >:
folly::BaseFormatter< TestExtendingFormatter< containerMode, Args... >, containerMode, Args... >

Private Member Functions

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

Friends

class BaseFormatter< TestExtendingFormatter< containerMode, Args... >, containerMode, Args... >
 
template<class... A>
std::string texsformat (StringPiece fmt, A &&...arg)
 

Additional Inherited Members

- Public Types inherited from folly::BaseFormatter< TestExtendingFormatter< containerMode, Args... >, containerMode, Args... >
typedef detail::FormatterTag IsFormatter
 
typedef BaseFormatter BaseType
 
- Public Member Functions inherited from folly::BaseFormatter< TestExtendingFormatter< 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 TestExtendingFormatter< containerMode, Args >

Definition at line 468 of file FormatTest.cpp.

Constructor & Destructor Documentation

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

Definition at line 477 of file FormatTest.cpp.

478  : BaseFormatter<
479  TestExtendingFormatter<containerMode, Args...>,
480  containerMode,
481  Args...>(str, std::forward<Args>(args)...) {}
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)

Member Function Documentation

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

Definition at line 484 of file FormatTest.cpp.

References testing::Args(), folly::format(), s, folly::sformat(), and string.

484  {
485  std::string result;
486  auto appender = [&result](StringPiece s) {
487  result.append(s.data(), s.size());
488  };
489  this->template getFormatValue<K>().format(arg, appender);
490  result = sformat("{{{}}}", result);
491  cb(StringPiece(result));
492  }
std::string sformat(StringPiece fmt, Args &&...args)
Definition: Format.h:280
const char * string
Definition: Conv.cpp:212
static set< string > s
Formatter< false, Args... > format(StringPiece fmt, Args &&...args)
Definition: Format.h:271
Range< const char * > StringPiece

Friends And Related Function Documentation

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

Definition at line 497 of file FormatTest.cpp.

template<bool containerMode, class... Args>
template<class... A>
std::string texsformat ( StringPiece  fmt,
A &&...  arg 
)
friend

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