Commit 2eeeece9 authored by Djamel Grine's avatar Djamel Grine
Browse files

Doxygen wip

parent 7300fd4f
Loading
Loading
Loading
Loading
+1 −0
Changes for .gitignore: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ build/
build-xcode/
releases/
examples/build/
.ccls-cache/
reflection.hpp
.ycm_extra_conf.py
.clang-format
+3 −3
Changes for library/inc/argo/action/run.hpp: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -63,20 +63,20 @@ Run<Type> run(const typename Run<Type>::function_type &fnc)
{
    return Run<Type>{ fnc };
}
//!Creates an action that accepts a callback with prototype `bool(core::Context &, const Type)`. By default, `Type = std::string`.
//!\overload Creates an action that accepts a callback with prototype `bool(core::Context &, const Type)`. By default, `Type = std::string`.
template <typename Type = std::string>
Run<Type> run(const typename Run<Type>::function_with_context_type &fnc)
{
    return Run<Type>{ fnc };
}
//Wrappers
//!Creates an action that accepts a callback with prototype `bool(core::Context &)`.
//!\overload Creates an action that accepts a callback with prototype `bool(core::Context &)`.
inline Run<std::string> run(const std::function<bool(core::Context &)> &fnc)
{
    auto wrapper = [fnc](core::Context &context, const std::string &value) { fnc(context); return true; };
    return run(wrapper);
}
//!Creates an action that accepts a callback with prototype `void()`. Note that this is the most trivial way of attaching a stateless, non-failing callback to a handler.
//!\overload Creates an action that accepts a callback with prototype `void()`. Note that this is the most trivial way of attaching a stateless, non-failing callback to a handler.
inline Run<std::string> run(const std::function<void()> &fnc)
{
    auto wrapper = [fnc](const std::string &value) { fnc(); return true; };