///////////////////////////////cti.p///////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
-// senf::console::detail::ArgumentInfoBase
-
-prefix_ senf::console::detail::ArgumentInfoBase::ArgumentInfoBase(std::string const & type_)
- : type (type_), name (), hasDefault (false)
-{}
-
-///////////////////////////////////////////////////////////////////////////
// senf::console::detail::ArgumentInfo<ParameterType>
template <class ParameterType>
// senf::console::ParsedCommandOverloadBase
template <class Type>
-prefix_ senf::console::detail::ArgumentInfo<Type> &
-senf::console::ParsedCommandOverloadBase::arg(unsigned n)
- const
-{
- return dynamic_cast<detail::ArgumentInfo<Type> &>(arg(n));
-}
-
-template <class Type>
prefix_ void senf::console::ParsedCommandOverloadBase::addParameter()
{
parameters_.push_back(detail::ArgumentInfo<Type>::create());
#include BOOST_PP_ITERATE()
///////////////////////////////////////////////////////////////////////////
-// senf::console::ParsedCommandAttributorBase
-
-template <class Type>
-prefix_ void senf::console::ParsedCommandAttributorBase::defaultValue(Type const & value)
- const
-{
- overload().arg<Type>(index_).defaultValue = value;
- overload().arg(index_).hasDefault = true;
-}
-
-template <class Type, class Fn>
-prefix_ void senf::console::ParsedCommandAttributorBase::parser(Fn fn)
- const
-{
- overload().arg<Type>(index_).parser = fn;
-}
-
-///////////////////////////////////////////////////////////////////////////
// senf::console::ParsedCommandAttributor<Overload>
template <class Overload>
defaultValue(value_type const & value)
const
{
- ParsedCommandAttributorBase::defaultValue<value_type>(value);
+ this->overload().arg<index>().defaultValue = value;
+ this->overload().arg(index).hasDefault = true;
}
template <class Overload, unsigned index, bool flag>
prefix_ void senf::console::ParsedArgumentAttributor<Overload,index,flag>::parser(Fn fn)
const
{
- ParsedCommandAttributorBase::parser<value_type>(fn);
+ this->overload().arg<index>().parser = fn;
}
///////////////////////////////////////////////////////////////////////////
prefix_
senf::console::ParsedArgumentAttributor<Overload, index, false>::
ParsedArgumentAttributor(Overload & overload)
- : ParsedArgumentAttributorBase< Overload,
- ParsedArgumentAttributor<Overload, index, false> > (overload, index)
+ : ParsedArgumentAttributorBase<
+ Overload, ParsedArgumentAttributor<Overload, index, false> > (overload, index)
{}
///////////////////////////////////////////////////////////////////////////
namespace console {
namespace detail {
+#ifndef DOXYGEN
+
struct ParsedCommandAddNodeAccess
{
template <class Attributor, class Node>
cmdNode.add( CreateParsedCommandOverload<CmdTraits>::create(fn) ) );
}
+#endif
+
}}}
+#ifndef DOXYGEN
+
template <class Function>
typename senf::console::detail::ParsedCommandTraits<Function>::Attributor
senf::console::senf_console_add_node(DirectoryNode & node, std::string const & name,
node, name, senf::membind(fn,&owner));
}
+#endif
+
///////////////////////////////cti.e///////////////////////////////////////
#undef prefix_