X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2FConsole%2FSTLSupport.ct;h=1d0d99fcf2b386da032d5225b5b27415cd446b6a;hb=a29a9ca13ed8105681968759066ed7788c818cb8;hp=08116a07f7c96622272e4eb0cb157c2a83472ab5;hpb=1d058092bd771d52996416763b5d9cafadc2e087;p=senf.git diff --git a/senf/Utils/Console/STLSupport.ct b/senf/Utils/Console/STLSupport.ct index 08116a0..1d0d99f 100644 --- a/senf/Utils/Console/STLSupport.ct +++ b/senf/Utils/Console/STLSupport.ct @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2009 +// Copyright (C) 2009 // Fraunhofer Institute for Open Communication Systems (FOKUS) // Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund @@ -40,12 +40,7 @@ template prefix_ std::string senf::console::detail::CollectionArgumentTraitsBase::description() { - std::string type (prettyName(typeid(Collection))); - std::string::size_type e (type.find('<')); - if (e == std::string::npos) e = type.size(); - std::string::size_type b (type.rfind(':', e)); - if (b == std::string::npos) b = 0; else ++b; - return type.substr(b,e-b) + "<" + return senf::prettyBaseName(typeid(Collection)) + "<" + ArgumentTraits::description() + ">"; } @@ -88,7 +83,7 @@ senf::console::detail::CollectionReturnValueTraits::format(Collectio if (i != i_end) for (;;) { os << senf::console::str(*i); - if (++i == i_end) + if (++i == i_end) break; else os << " "; @@ -120,12 +115,7 @@ parse(ParseCommandInfo::TokensRange const & tokens, Collection & out) template prefix_ std::string senf::console::detail::MapArgumentTraits::description() { - std::string type (prettyName(typeid(Collection))); - std::string::size_type e (type.find('<')); - if (e == std::string::npos) e = type.size(); - std::string::size_type b (type.rfind(':', e)); - if (b == std::string::npos) b = 0; else ++b; - return type.substr(b,e-b) + "<" + return senf::prettyBaseName(typeid(Collection)) + "<" + ArgumentTraits::description() + "," + ArgumentTraits::description() + ">"; } @@ -155,7 +145,7 @@ senf::console::detail::MapReturnValueTraits::format(Collection const os << senf::console::str(i->first) << "=" << senf::console::str(i->second); - if (++i == i_end) + if (++i == i_end) break; else os << " ";