#include <formatter.hh>
Basic operations | |
template<typename T_> | |
Formatter (const T_ &t) | |
Formatter (const Formatter &other) | |
Public Member Functions | |
virtual std::string | newline () const |
virtual std::string | indent (const int i) const |
A Formatter is required by most MetadataKey pretty_print methods. Instead of requiring that formatters support every format method with every possible role for every class, scary template voodoo is used to ensure that only the format methods appropriate for the classes passed as template parameters with roles appropriate for those classes are required.
A Formatter can be implicitly constructed from any type that implements CanFormat<> for every requested type, as well as the CanSpace interface.
For a basic formatter that uses paludis::stringify() to do all formatting, see StringifyFormatter.
paludis::Formatter< T1_, T2_, T3_, T4_, T5_, T6_, T7_, T8_, T9_, T10_, T11_, T12_, T13_, T14_, T15_ >::Formatter | ( | const T_ & | t | ) | [inline] |
virtual std::string paludis::Formatter< T1_, T2_, T3_, T4_, T5_, T6_, T7_, T8_, T9_, T10_, T11_, T12_, T13_, T14_, T15_ >::newline | ( | ) | const [inline, virtual] |
Output a newline.
Implements paludis::CanSpace.
virtual std::string paludis::Formatter< T1_, T2_, T3_, T4_, T5_, T6_, T7_, T8_, T9_, T10_, T11_, T12_, T13_, T14_, T15_ >::indent | ( | const int | int | ) | const [inline, virtual] |
Output an indent marker of the specified indent level.
Implements paludis::CanSpace.