X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2FConsole%2FTraits.ih;h=f979e9e82e39c81622884b0a19884b17224dc26e;hb=6aae6e526573187ece558842e928578e5aa4cc4c;hp=40e55e50bd1ac6d33b44f3b64a4f683aad8c30ac;hpb=601d1f509f5bb24df167a4dd5a20da67a0af9af8;p=senf.git diff --git a/senf/Utils/Console/Traits.ih b/senf/Utils/Console/Traits.ih index 40e55e5..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 "../../Utils/singleton.hh" +#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); } };