template<class Type>
struct senf::console::ArgumentTraits< Type >
Customize argument parsing.
ArgumentTraits provides argument parsing, Additionally, this class provides a way to get a string-description of a type and to convert a value back into it's string representation used to display default values.
The default implementation provided here
- will use senf_console_parse_argument() to parse a value. This functions default implementation uses
boost::lexical_cast
and thereby iostreams
to convert an argument consisting of a single input token into the required type.
- will name types by returning the last component of the fully scoped name (e.g.
"string"
for std::string
).
- Will format values (for default value display) by forwarding the value to the ReturnValueTraits of that type.
To customize just the argument parsing, just provide an implementation of senf_console_parse_argument(). Alternatively or to customize type naming or default value formatting, specialize ArgumentTraits for the type.
Definition at line 201 of file Parse.hh.