senf::console::ReturnValueTraits< Type > Struct Template Reference

Customize return value formating. More...

#include <senf/Utils/Console/Parse.hh>

Public Types

typedef Type type
 

Static Public Member Functions

static void format (Type const &value, std::ostream &os)
 Write value to os. More...
 

Related Functions

(Note that these are not member functions.)

template<class Type >
void senf_console_format_value (Type const &value, std::ostream &os)
 Return value formatter. More...
 

Detailed Description

template<class Type>
struct senf::console::ReturnValueTraits< Type >

Customize return value formating.

ReturnValueTraits provides return value formatting. The default implementation provided here will forward the call directly to senf_console_format_value(). The default implementation of that function will write the value to os using standard iostream formatting.

To customize this behavior for some type, either provide an implementation of senf_console_format_value() in the types namespace or provide a specialization of ReturnValueTraits.

The output should not end in a newline since one is added automatically.

Definition at line 203 of file Parse.hh.

Member Typedef Documentation

◆ type

template<class Type >
typedef Type senf::console::ReturnValueTraits< Type >::type

Definition at line 107 of file Traits.hh.

Member Function Documentation

◆ format()

template<class Type >
static void senf::console::ReturnValueTraits< Type >::format ( Type const &  value,
std::ostream &  os 
)
static

Write value to os.

Friends And Related Function Documentation

◆ senf_console_format_value()

template<class Type >
void senf_console_format_value ( Type const &  value,
std::ostream &  os 
)
related

Return value formatter.

See also
ReturnValuetraits

The documentation for this struct was generated from the following files: