X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2FConsole%2FTraits.ih;h=f979e9e82e39c81622884b0a19884b17224dc26e;hb=6aae6e526573187ece558842e928578e5aa4cc4c;hp=85213bb8bc27434638453dddea517bd5aa52841f;hpb=26610f603ebdd465307b9621f532c1fe19fd5571;p=senf.git diff --git a/senf/Utils/Console/Traits.ih b/senf/Utils/Console/Traits.ih index 85213bb..f979e9e 100644 --- a/senf/Utils/Console/Traits.ih +++ b/senf/Utils/Console/Traits.ih @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2008 +// Copyright (C) 2008 // Fraunhofer Institute for Open Communication Systems (FOKUS) // Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund @@ -28,25 +28,52 @@ // Custom includes #include +#include #include #include #include #include #include #include -#include +#include ///////////////////////////////ih.p//////////////////////////////////////// namespace senf { namespace console { + + template struct ArgumentTraits; + template struct ReturnValueTraits; + namespace detail { + template + struct MatchingShortType + : public boost::mpl::if_c::is_signed,short,unsigned short> + {}; + + template + struct CharArgumentTraits + : public ArgumentTraits::type> + { + typedef ArgumentTraits::type> base; + typedef CharT type; + static void parse(ParseCommandInfo::TokensRange const & tokens, CharT & out); + static std::string description(); + }; + + template + struct CharReturnValueTraits + : public ReturnValueTraits::type> + { + typedef CharT type; + }; + #ifndef DOXYGEN struct StringILess { bool operator()(std::string const & left, std::string const & right) const - { return boost::algorithm::to_lower_copy(left) + { return boost::algorithm::to_lower_copy(left) < boost::algorithm::to_lower_copy(right); } };