Utils/Termlib: Extend the completion API
[senf.git] / Utils / Console / ParsedCommand.cti
index c0d42a8..a35a827 100644 (file)
@@ -45,7 +45,8 @@ senf::console::detail::ArgumentInfo<ParameterType>::create()
 
 template <class ParameterType>
 prefix_ senf::console::detail::ArgumentInfo<ParameterType>::ArgumentInfo()
-    : ArgumentInfoBase ( ArgumentTraits<ParameterType>::description() ),
+    : ArgumentInfoBase ( ArgumentTraits<ParameterType>::description(), 
+                         ArgumentTraits<ParameterType>::singleToken ),
       defaultValue ()
 {}
 
@@ -104,6 +105,15 @@ senf::console::ParsedArgumentAttributorBase<Overload,Self,ReturnType>::doc(std::
 
 template <class Overload, class Self, class ReturnType>
 prefix_ Self senf::console::ParsedArgumentAttributorBase<Overload,Self,ReturnType>::
+shortdoc(std::string const & doc)
+    const
+{
+    this->ParsedCommandAttributorBase::shortDoc(doc);
+    return static_cast<Self const &>(*this);
+}
+
+template <class Overload, class Self, class ReturnType>
+prefix_ Self senf::console::ParsedArgumentAttributorBase<Overload,Self,ReturnType>::
 overloadDoc(std::string const & doc)
     const
 {
@@ -137,6 +147,15 @@ senf::console::ParsedArgumentAttributorBase<Overload,Self,void>::doc(std::string
 }
 
 template <class Overload, class Self>
+prefix_ Self senf::console::ParsedArgumentAttributorBase<Overload, Self, void>::
+shortdoc(std::string const & doc)
+    const
+{
+    this->ParsedCommandAttributorBase::shortDoc(doc);
+    return static_cast<Self const &>(*this);
+}
+
+template <class Overload, class Self>
 prefix_ Self senf::console::ParsedArgumentAttributorBase<Overload,Self,void>::
 overloadDoc(std::string const & doc)
     const
@@ -182,7 +201,7 @@ argInfo(ArgumentPack const & args)
 
     return next();
 
-#   undef HaveArg
+#   undef ProcessArg
 }
 
 template <class Overload, unsigned index, bool flag>