#define IH_ParsedCommand_ 1
// Custom includes
+#include <boost/function.hpp>
+#include <boost/intrusive_ptr.hpp>
+#include "Parse.hh"
///////////////////////////////ih.p////////////////////////////////////////
std::string type;
std::string name;
+ std::string defaultDoc;
bool hasDefault;
std::string doc;
: public ArgumentInfoBase
{
typedef boost::intrusive_ptr<ArgumentInfo> ptr;
+ typedef boost::function<void (ParseCommandInfo::TokensRange const &,
+ ParameterType &)> Parser;
static ptr create();
ArgumentInfo();
ParameterType defaultValue;
+ Parser parser;
virtual std::string defaultValueStr() const;
};
- template <class Function, bool isFN=senf::is_any_function<Function>::value>
- struct ParsedCommandTraits
- {};
-
// FirstArgType returns void, if the function has no arguments, otherwise it returns arg1_type
template <class Traits, bool flag=(Traits::arity>0)>
typedef typename Traits::arg1_type type;
};
+ template <class Function, bool isFN=senf::is_any_function<Function>::value>
+ struct ParsedCommandTraits
+ {};
+
template <class Function>
struct ParsedCommandTraits<Function, true>
{