X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Console%2FParsedCommand.ih;h=c2d887baa58bf4ee8d1c8c3ac5295353171bd74a;hb=fe92380af7b511d398290e4ab0c535025006b57b;hp=19a4de64ee4b6b173a9b82b5ea6da1be2bfc08fa;hpb=8e708e9784c76461252c3bdf646d291c593a49be;p=senf.git diff --git a/Console/ParsedCommand.ih b/Console/ParsedCommand.ih index 19a4de6..c2d887b 100644 --- a/Console/ParsedCommand.ih +++ b/Console/ParsedCommand.ih @@ -35,6 +35,17 @@ namespace senf { namespace console { + + template < class FunctionTraits, + class ReturnType=typename FunctionTraits::result_type, + unsigned arity=FunctionTraits::arity > + class ParsedCommandOverload; + + template < class Overload, + unsigned index=0, + bool flag=(index < unsigned(Overload::traits::arity)) > + class ParsedArgumentAttributor; + namespace detail { #ifndef DOXYGEN @@ -90,10 +101,10 @@ namespace detail { struct ParsedCommandTraits {}; - template - struct ParsedCommandTraits + template + struct ParsedCommandTraits { - typedef Function base_type; + typedef Fn base_type; typedef typename senf::remove_any_pointer::type function_type; typedef boost::function_traits base_traits; typedef typename FirstArgType::type first_arg_type; @@ -106,24 +117,17 @@ namespace detail { base_traits> ::type traits; + typedef typename senf::remove_cvref::type result_type; + static const bool is_member = boost::is_member_pointer::value; typedef typename senf::member_class::type class_type; - }; - template - struct CheckVoidReturn - { - template - static void call(Fn fn, std::ostream & os); + typedef ParsedCommandOverload Overload; + typedef ParsedArgumentAttributor Attributor; }; - template <> - struct CheckVoidReturn - { - template - static void call(Fn fn, std::ostream & os); - }; + struct ParsedCommandAddNodeAccess; #endif