X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Console%2FParsedCommand.ih;h=19a4de64ee4b6b173a9b82b5ea6da1be2bfc08fa;hb=8e708e9784c76461252c3bdf646d291c593a49be;hp=d8a72d28ab5715739957ddca477e4aa97c8d3138;hpb=61bbb1c1ec66b1a41951fc971d0325095e17e7a9;p=senf.git diff --git a/Console/ParsedCommand.ih b/Console/ParsedCommand.ih index d8a72d2..19a4de6 100644 --- a/Console/ParsedCommand.ih +++ b/Console/ParsedCommand.ih @@ -27,6 +27,9 @@ #define IH_ParsedCommand_ 1 // Custom includes +#include +#include +#include "Parse.hh" ///////////////////////////////ih.p//////////////////////////////////////// @@ -43,6 +46,7 @@ namespace detail { std::string type; std::string name; + std::string defaultDoc; bool hasDefault; std::string doc; @@ -56,19 +60,18 @@ namespace detail { : public ArgumentInfoBase { typedef boost::intrusive_ptr ptr; + typedef boost::function Parser; static ptr create(); ArgumentInfo(); ParameterType defaultValue; + Parser parser; virtual std::string defaultValueStr() const; }; - template ::value> - struct ParsedCommandTraits - {}; - // FirstArgType returns void, if the function has no arguments, otherwise it returns arg1_type template 0)> @@ -83,6 +86,10 @@ namespace detail { typedef typename Traits::arg1_type type; }; + template ::value> + struct ParsedCommandTraits + {}; + template struct ParsedCommandTraits {