X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2FConsole%2FUtility.hh;h=5c2b2634a5bc72ce84b1ce48445087173061150c;hb=ea5f02fb88dfab3932368bbafdc863b8ad585cc1;hp=6ccc579112886c831a92e67ae530ad687d41f589;hpb=52a6fb56dce12132287e181b787d2474d93b0183;p=senf.git diff --git a/senf/Utils/Console/Utility.hh b/senf/Utils/Console/Utility.hh index 6ccc579..5c2b263 100644 --- a/senf/Utils/Console/Utility.hh +++ b/senf/Utils/Console/Utility.hh @@ -36,6 +36,38 @@ namespace senf { namespace console { + template + struct CharAsString + { + CharAsString(); + CharAsString(CharT value_); + operator CharT () const; + CharT value; + }; + +#ifndef DOXYGEN + + template + struct ArgumentTraits< CharAsString > + { + typedef CharAsString type; + static bool const singleToken = true; + + static void parse(ParseCommandInfo::TokensRange const & tokens, CharAsString & out); + static std::string description(); + static std::string str(CharAsString value); + }; + + template + struct ReturnValueTraits< CharAsString > + { + typedef CharAsString type; + + static void format(CharAsString value, std::ostream & os); + }; + +#endif + /** \brief Value range A value range may be represented in the console either by a single value (setting both \a @@ -147,7 +179,7 @@ namespace console { ///////////////////////////////hh.e//////////////////////////////////////// //#include "Utility.cci" #include "Utility.ct" -//#include "Utility.cti" +#include "Utility.cti" #endif