// $Id$
//
-// Copyright (C) 2009
+// Copyright (C) 2009
// Fraunhofer Institute for Open Communication Systems (FOKUS)
// Competence Center NETwork research (NET), St. Augustin, GERMANY
// Stefan Bund <g0dil@berlios.de>
prefix_ std::string
senf::console::detail::CollectionArgumentTraitsBase<Collection>::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<typename Collection::value_type>::description() + ">";
}
if (i != i_end)
for (;;) {
os << senf::console::str(*i);
- if (++i == i_end)
+ if (++i == i_end)
break;
else
os << " ";
template <class Collection>
prefix_ std::string senf::console::detail::MapArgumentTraits<Collection>::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<typename Collection::key_type>::description() + ","
+ ArgumentTraits<typename Collection::mapped_type>::description() + ">";
}
os << senf::console::str(i->first)
<< "="
<< senf::console::str(i->second);
- if (++i == i_end)
+ if (++i == i_end)
break;
else
os << " ";