X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2FConsole%2FTraits.cti;h=f6dd8927dc72a3c3dee74693024417f7ed3a5b15;hb=52a6fb56dce12132287e181b787d2474d93b0183;hp=0173633f49dc04ecd5bc9d74530969c15510c94d;hpb=1d058092bd771d52996416763b5d9cafadc2e087;p=senf.git diff --git a/senf/Utils/Console/Traits.cti b/senf/Utils/Console/Traits.cti index 0173633..f6dd892 100644 --- a/senf/Utils/Console/Traits.cti +++ b/senf/Utils/Console/Traits.cti @@ -80,9 +80,7 @@ prefix_ void senf::console::format(Type const & value, std::ostream & os) template prefix_ std::string senf::console::ArgumentTraits::description() { - std::string type (prettyName(typeid(Type))); - std::string::size_type i (type.rfind(':')); - return i == std::string::npos ? type : type.substr(i+1); + return prettyBaseName(typeid(Type)); } template @@ -93,6 +91,24 @@ prefix_ std::string senf::console::ArgumentTraits::str(Type const & value) return ss.str(); } +/////////////////////////////////////////////////////////////////////////// +// senf::console::detail::CharArgumentTraits + +template +prefix_ void senf::console::detail::CharArgumentTraits:: +parse(ParseCommandInfo::TokensRange const & tokens, CharT & out) +{ + typename base::type v; + base::parse(tokens,v); + out = v; +} + +template +prefix_ std::string senf::console::detail::CharArgumentTraits::description() +{ + return std::numeric_limits::is_signed ? "byte" : "unsigned byte"; +} + ///////////////////////////////cti.e/////////////////////////////////////// #undef prefix_