X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FConsole%2FSTLSupport.hh;h=d4594888fa6cee6e328b63b033bc3c40b8a726d9;hb=c5d0e492a701a054b1f3d56e128b2c4675b0d50b;hp=69a6e14bf48074e6f8a96fae8d3b3ea3fc263159;hpb=2d9b8768b1a5fa77e1abde6e48664e2d5eecd7a2;p=senf.git diff --git a/Utils/Console/STLSupport.hh b/Utils/Console/STLSupport.hh index 69a6e14..d459488 100644 --- a/Utils/Console/STLSupport.hh +++ b/Utils/Console/STLSupport.hh @@ -78,6 +78,25 @@ namespace console { : public SequenceReturnValueTraits< std::list > {}; + template + struct ArgumentTraits< std::pair > + { + typedef std::pair type; + static bool const singleToken = false; + + static void parse(ParseCommandInfo::TokensRange const & tokens, type & out); + static std::string description(); + static std::string str(type const & value); + }; + + template + struct ReturnValueTraits< std::pair > + { + typedef std::pair type; + + static void format(type const & value, std::ostream & os); + }; + #endif }}