X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FConsole%2FOverloadedCommand.hh;h=4402742127428f1cae5c1eb72d9ee4a67b0847de;hb=731a143df4de38d4c8b0a81121990951971cd858;hp=fb374ec301b35e21ba1a8881bc26d98d63d7d771;hpb=13d1ffe0c19d3085f1cf28f1a1c53d96572c0abe;p=senf.git diff --git a/Utils/Console/OverloadedCommand.hh b/Utils/Console/OverloadedCommand.hh index fb374ec..4402742 100644 --- a/Utils/Console/OverloadedCommand.hh +++ b/Utils/Console/OverloadedCommand.hh @@ -29,6 +29,7 @@ // Custom includes #include "Node.hh" #include +#include #include "../../Utils/intrusive_refcount.hh" //#include "OverloadedCommand.mpp" @@ -48,6 +49,7 @@ namespace console { std::string type; ///< Argument type (string representation) std::string defaultValue; ///< Default value (string representation) or empty string std::string doc; ///< Documentation for this argument + bool singleToken; ///< \c true, if argument is parsed from single token }; /** \brief Base class for command overload of OverloadedCommandNode @@ -159,6 +161,8 @@ namespace console { class OverloadedCommandNode : public CommandNode { + typedef std::vector Overloads; + public: /////////////////////////////////////////////////////////////////////////// // Types @@ -170,6 +174,8 @@ namespace console { typedef OverloadedCommandNode node_type; typedef OverloadedCommandNode & return_type; + typedef boost::iterator_range OverloadsRange; + /////////////////////////////////////////////////////////////////////////// ///\name Structors and default members ///@{ @@ -192,6 +198,8 @@ namespace console { /**< overloadIndex returns the index of \a overload in the internal list of overloads. */ + OverloadsRange overloads() const; ///< Get all overloads + ptr thisptr(); cptr thisptr() const; @@ -203,8 +211,6 @@ namespace console { virtual void v_execute(boost::any & rv, std::ostream & os, ParseCommandInfo const & command) const; - typedef std::vector Overloads; - Overloads overloads_; std::string doc_; std::string shortdoc_;