Mercurial > irccd
changeset 96:3b24366c7213
Misc: switch to \ for Doxygen, #480
line wrap: on
line diff
--- a/lib/irccd/alias.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/alias.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_ALIAS_HPP /** - * @file alias.hpp - * @brief Create irccdctl aliases. + * \file alias.hpp + * \brief Create irccdctl aliases. */ #include <ostream> @@ -31,8 +31,8 @@ namespace irccd { /** - * @class AliasArg - * @brief Describe an alias argument. + * \class AliasArg + * \brief Describe an alias argument. * * When the user specify arguments, it can precise an applied argument or a placeholder that will be substituted * during command line invocation. @@ -48,15 +48,15 @@ /** * Construct an argument. * - * @pre value must not be empty - * @param value the value + * \pre value must not be empty + * \param value the value */ AliasArg(std::string value); /** * Check if the argument is a placeholder. * - * @return true if the argument is a placeholder + * \return true if the argument is a placeholder */ inline bool isPlaceholder() const noexcept { @@ -66,31 +66,31 @@ /** * Get the placeholder index (e.g %0 returns 0) * - * @pre isPlaceholder() must return true - * @return the position + * \pre isPlaceholder() must return true + * \return the position */ unsigned index() const noexcept; /** * Get the real value. * - * @pre isPlaceholder() must return false - * @return the value + * \pre isPlaceholder() must return false + * \return the value */ const std::string &value() const noexcept; /** * Output the alias to the stream. * - * @param out the output stream - * @return out + * \param out the output stream + * \return out */ friend std::ostream &operator<<(std::ostream &out, const AliasArg &); }; /** - * @class AliasCommand - * @brief Describe a user-provided alias command. + * \class AliasCommand + * \brief Describe a user-provided alias command. * * An alias command is just a command with a set of applied or placeholders arguments. */ @@ -103,8 +103,8 @@ /** * Create an alias command. * - * @param command the command - * @param args the arguments + * \param command the command + * \param args the arguments */ inline AliasCommand(std::string command, std::vector<AliasArg> args = {}) noexcept : m_command(std::move(command)) @@ -115,7 +115,7 @@ /** * Get the command to execute. * - * @return the command name + * \return the command name */ inline const std::string &command() const noexcept { @@ -125,7 +125,7 @@ /** * Get the arguments. * - * @return the arguments + * \return the arguments */ inline const std::vector<AliasArg> &args() const noexcept { @@ -134,8 +134,8 @@ }; /** - * @class Alias - * @brief A set of commands to execute with their arguments. + * \class Alias + * \brief A set of commands to execute with their arguments. * * An alias is a composition of AliasCommand, typically, the user is able to set an alias that execute a list of * specified commands in order they are defined. @@ -148,7 +148,7 @@ /** * Create an alias. * - * @param name the alias name + * \param name the alias name */ inline Alias(std::string name) noexcept : m_name(std::move(name)) @@ -158,7 +158,7 @@ /** * Get the alias name. * - * @return the name + * \return the name */ inline const std::string &name() const noexcept {
--- a/lib/irccd/application.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/application.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_APPLICATION_HPP /** - * @file application.hpp - * @brief Base class for irccd and irccdctl. + * \file application.hpp + * \brief Base class for irccd and irccdctl. */ #include <cassert> @@ -38,7 +38,7 @@ using RemoteCommands = std::unordered_map<std::string, std::unique_ptr<RemoteCommand>>; /** - * @brief Base class for creating irccd front ends. + * \brief Base class for creating irccd front ends. */ class Application { protected: @@ -56,7 +56,7 @@ /** * Access the remote commands. * - * @return the commands + * \return the commands */ inline const RemoteCommands &commands() const noexcept { @@ -66,9 +66,9 @@ /** * Add a new command. * - * @pre command must not be null - * @pre the command must not exist - * @param command the command + * \pre command must not be null + * \pre the command must not exist + * \param command the command */ inline void addCommand(std::unique_ptr<RemoteCommand> command) {
--- a/lib/irccd/cmd-help.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-help.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_HPPELP_HPP /** - * @file cmd-help.hpp - * @brief Implementation of irccdctl help. + * \file cmd-help.hpp + * \brief Implementation of irccdctl help. */ #include "command.hpp" @@ -31,8 +31,8 @@ namespace command { /** - * @class Help - * @brief Implementation of irccdctl help. + * \class Help + * \brief Implementation of irccdctl help. */ class Help : public RemoteCommand { public: @@ -41,12 +41,12 @@ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const override; };
--- a/lib/irccd/cmd-plugin-info.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-plugin-info.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_PLUGIN_INFO_HPP /** - * @file cmd-plugin-info.hpp - * @brief Implementation of plugin-info transport command. + * \file cmd-plugin-info.hpp + * \brief Implementation of plugin-info transport command. */ #include "command.hpp" @@ -31,8 +31,8 @@ namespace command { /** - * @class PluginInfo - * @brief Implementation of plugin-info transport command. + * \class PluginInfo + * \brief Implementation of plugin-info transport command. */ class PluginInfo : public RemoteCommand { public: @@ -42,27 +42,27 @@ PluginInfo(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; /** - * @copydoc RemoteCommand::result + * \copydoc RemoteCommand::result */ void result(Irccdctl &irccdctl, const json::Value &response) const override; };
--- a/lib/irccd/cmd-plugin-list.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-plugin-list.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_PLUGIN_LIST_HPP /** - * @file cmd-plugin-list.hpp - * @brief Implementation of plugin-list transport command. + * \file cmd-plugin-list.hpp + * \brief Implementation of plugin-list transport command. */ #include "command.hpp" @@ -31,8 +31,8 @@ namespace command { /** - * @class PluginList - * @brief Implementation of plugin-list transport command. + * \class PluginList + * \brief Implementation of plugin-list transport command. */ class PluginList : public RemoteCommand { public: @@ -42,17 +42,17 @@ PluginList(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; /** - * @copydoc RemoteCommand::result + * \copydoc RemoteCommand::result */ void result(Irccdctl &irccdctl, const json::Value &response) const override; };
--- a/lib/irccd/cmd-plugin-load.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-plugin-load.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_PLUGIN_LOAD_HPP /** - * @file cmd-plugin-load.hpp - * @brief Implementation of plugin-load transport command. + * \file cmd-plugin-load.hpp + * \brief Implementation of plugin-load transport command. */ #include "command.hpp" @@ -31,8 +31,8 @@ namespace command { /** - * @class PluginLoad - * @brief Implementation of plugin-load transport command. + * \class PluginLoad + * \brief Implementation of plugin-load transport command. */ class PluginLoad : public RemoteCommand { public: @@ -42,17 +42,17 @@ PluginLoad(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-plugin-reload.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-plugin-reload.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_PLUGIN_RELOAD_HPP /** - * @file cmd-plugin-reload.hpp - * @brief Implementation of plugin-reload transport command. + * \file cmd-plugin-reload.hpp + * \brief Implementation of plugin-reload transport command. */ #include "command.hpp" @@ -31,8 +31,8 @@ namespace command { /** - * @class PluginReload - * @brief Implementation of plugin-reload transport command. + * \class PluginReload + * \brief Implementation of plugin-reload transport command. */ class PluginReload : public RemoteCommand { public: @@ -42,17 +42,17 @@ PluginReload(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-plugin-unload.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-plugin-unload.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_PLUGIN_UNLOAD_HPP /** - * @file cmd-plugin-unload.hpp - * @brief Implementation of plugin-unload transport command. + * \file cmd-plugin-unload.hpp + * \brief Implementation of plugin-unload transport command. */ #include "command.hpp" @@ -31,8 +31,8 @@ namespace command { /** - * @class PluginUnload - * @brief Implementation of plugin-unload transport command. + * \class PluginUnload + * \brief Implementation of plugin-unload transport command. */ class PluginUnload : public RemoteCommand { public: @@ -42,17 +42,17 @@ PluginUnload(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-server-cmode.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-cmode.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_CMODE_HPP /** - * @file cmd-server-cmode.hpp - * @brief Implementation of server-cmode transport command. + * \file cmd-server-cmode.hpp + * \brief Implementation of server-cmode transport command. */ #include "command.hpp" @@ -31,8 +31,8 @@ namespace command { /** - * @class ServerChannelMode - * @brief Implementation of server-cmode transport command. + * \class ServerChannelMode + * \brief Implementation of server-cmode transport command. */ class ServerChannelMode : public RemoteCommand { public: @@ -42,17 +42,17 @@ ServerChannelMode(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-server-cnotice.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-cnotice.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_CNOTICE_HPP /** - * @file cmd-server-cnotice.hpp - * @brief Implementation of server-cnotice transport command. + * \file cmd-server-cnotice.hpp + * \brief Implementation of server-cnotice transport command. */ #include "command.hpp" @@ -31,8 +31,8 @@ namespace command { /** - * @class ServerChannelNotice - * @brief Implementation of server-cnotice transport command. + * \class ServerChannelNotice + * \brief Implementation of server-cnotice transport command. * * Send a channel notice to the specified channel. * @@ -51,17 +51,17 @@ ServerChannelNotice(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-server-connect.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-connect.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_CONNECT_HPP /** - * @file cmd-server-connect.hpp - * @brief Implementation of server-connect transport command. + * \file cmd-server-connect.hpp + * \brief Implementation of server-connect transport command. */ #include "command.hpp" @@ -31,8 +31,8 @@ namespace command { /** - * @class ServerConnect - * @brief Implementation of server-connect transport command. + * \class ServerConnect + * \brief Implementation of server-connect transport command. */ class ServerConnect : public RemoteCommand { public: @@ -42,22 +42,22 @@ ServerConnect(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::options + * \copydoc RemoteCommand::options */ std::vector<Option> options() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-server-disconnect.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-disconnect.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_DISCONNECT_HPP /** - * @file cmd-server-disconnect.hpp - * @brief Implementation of server-disconnect transport command. + * \file cmd-server-disconnect.hpp + * \brief Implementation of server-disconnect transport command. */ #include "command.hpp" @@ -31,8 +31,8 @@ namespace command { /** - * @class ServerDisconnect - * @brief Implementation of server-disconnect transport command. + * \class ServerDisconnect + * \brief Implementation of server-disconnect transport command. */ class ServerDisconnect : public RemoteCommand { public: @@ -42,19 +42,19 @@ ServerDisconnect(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** * Get list of arguments required. * - * @return the arguments required + * \return the arguments required */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-server-info.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-info.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_INFO_HPP /** - * @file cmd-server-info.hpp - * @brief Implementation of server-info transport command. + * \file cmd-server-info.hpp + * \brief Implementation of server-info transport command. */ #include "command.hpp" @@ -31,35 +31,35 @@ namespace command { /** - * @class ServerInfo - * @brief Implementation of server-info transport command. + * \class ServerInfo + * \brief Implementation of server-info transport command. */ class ServerInfo : public RemoteCommand { public: ServerInfo(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; /** - * @copydoc RemoteCommand::result + * \copydoc RemoteCommand::result */ void result(Irccdctl &irccdctl, const json::Value &response) const override; };
--- a/lib/irccd/cmd-server-invite.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-invite.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_INVITE_HPP /** - * @file cmd-server-invite.hpp - * @brief Implementation of server-invite transport command. + * \file cmd-server-invite.hpp + * \brief Implementation of server-invite transport command. */ #include "command.hpp" @@ -31,30 +31,30 @@ namespace command { /** - * @class ServerInvite - * @brief Implementation of server-invite transport command. + * \class ServerInvite + * \brief Implementation of server-invite transport command. */ class ServerInvite : public RemoteCommand { public: ServerInvite(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override;
--- a/lib/irccd/cmd-server-join.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-join.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_JOIN_HPP /** - * @file cmd-server-join.hpp - * @brief Implementation of server-join transport command. + * \file cmd-server-join.hpp + * \brief Implementation of server-join transport command. */ #include "command.hpp" @@ -31,30 +31,30 @@ namespace command { /** - * @class ServerJoin - * @brief Implementation of server-join transport command. + * \class ServerJoin + * \brief Implementation of server-join transport command. */ class ServerJoin : public RemoteCommand { public: ServerJoin(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-server-kick.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-kick.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_KICK_HPP /** - * @file cmd-server-kick.hpp - * @brief Implementation of server-kick transport command. + * \file cmd-server-kick.hpp + * \brief Implementation of server-kick transport command. */ #include "command.hpp" @@ -31,30 +31,30 @@ namespace command { /** - * @class ServerKick - * @brief Implementation of server-kick transport command. + * \class ServerKick + * \brief Implementation of server-kick transport command. */ class ServerKick : public RemoteCommand { public: ServerKick(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-server-list.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-list.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_LIST_HPP /** - * @file cmd-server-list.hpp - * @brief Implementation of server-list transport command. + * \file cmd-server-list.hpp + * \brief Implementation of server-list transport command. */ #include "command.hpp" @@ -31,15 +31,15 @@ namespace command { /** - * @class ServerList - * @brief Implementation of server-list transport command. + * \class ServerList + * \brief Implementation of server-list transport command. */ class ServerList : public RemoteCommand { public: ServerList(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override;
--- a/lib/irccd/cmd-server-me.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-me.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_ME_HPP /** - * @file cmd-server-me.hpp - * @brief Implementation of server-me transport command. + * \file cmd-server-me.hpp + * \brief Implementation of server-me transport command. */ #include "command.hpp" @@ -31,30 +31,30 @@ namespace command { /** - * @class ServerMe - * @brief Implementation of server-me transport command. + * \class ServerMe + * \brief Implementation of server-me transport command. */ class ServerMe : public RemoteCommand { public: ServerMe(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-server-message.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-message.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_MESSAGE_HPP /** - * @file cmd-server-message.hpp - * @brief Implementation of server-message transport command. + * \file cmd-server-message.hpp + * \brief Implementation of server-message transport command. */ #include "command.hpp" @@ -31,30 +31,30 @@ namespace command { /** - * @class ServerMessage - * @brief Implementation of server-message transport command. + * \class ServerMessage + * \brief Implementation of server-message transport command. */ class ServerMessage : public RemoteCommand { public: ServerMessage(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-server-mode.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-mode.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_MODE_HPP /** - * @file cmd-server-mode.hpp - * @brief Implementation of server-mode transport command. + * \file cmd-server-mode.hpp + * \brief Implementation of server-mode transport command. */ #include "command.hpp" @@ -31,30 +31,30 @@ namespace command { /** - * @class ServerMode - * @brief Implementation of server-mode transport command. + * \class ServerMode + * \brief Implementation of server-mode transport command. */ class ServerMode : public RemoteCommand { public: ServerMode(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-server-nick.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-nick.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_NICK_HPP /** - * @file cmd-server-nick.hpp - * @brief Implementation of server-nick transport command. + * \file cmd-server-nick.hpp + * \brief Implementation of server-nick transport command. */ #include "command.hpp" @@ -31,30 +31,30 @@ namespace command { /** - * @class ServerNick - * @brief Implementation of server-nick transport command. + * \class ServerNick + * \brief Implementation of server-nick transport command. */ class ServerNick : public RemoteCommand { public: ServerNick(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-server-notice.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-notice.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_NOTICE_HPP /** - * @file cmd-server-notice.hpp - * @brief Implementation of server-notice transport command. + * \file cmd-server-notice.hpp + * \brief Implementation of server-notice transport command. */ #include "command.hpp" @@ -31,30 +31,30 @@ namespace command { /** - * @class ServerNotice - * @brief Implementation of server-notice transport command. + * \class ServerNotice + * \brief Implementation of server-notice transport command. */ class ServerNotice : public RemoteCommand { public: ServerNotice(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-server-part.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-part.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_PART_HPP /** - * @file cmd-server-part.hpp - * @brief Implementation of server-part transport command. + * \file cmd-server-part.hpp + * \brief Implementation of server-part transport command. */ #include "command.hpp" @@ -31,30 +31,30 @@ namespace command { /** - * @class ServerPart - * @brief Implementation of server-part transport command. + * \class ServerPart + * \brief Implementation of server-part transport command. */ class ServerPart : public RemoteCommand { public: ServerPart(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-server-reconnect.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-reconnect.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_RECONNECT_HPP /** - * @file cmd-server-reconnect.hpp - * @brief Implementation of server-reconnect transport command. + * \file cmd-server-reconnect.hpp + * \brief Implementation of server-reconnect transport command. */ #include "command.hpp" @@ -31,30 +31,30 @@ namespace command { /** - * @class ServerReconnect - * @brief Implementation of server-reconnect transport command. + * \class ServerReconnect + * \brief Implementation of server-reconnect transport command. */ class ServerReconnect : public RemoteCommand { public: ServerReconnect(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-server-topic.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-server-topic.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_SERVER_TOPIC_HPP /** - * @file cmd-server-topic.hpp - * @brief Implementation of server-topic transport command. + * \file cmd-server-topic.hpp + * \brief Implementation of server-topic transport command. */ #include "command.hpp" @@ -31,30 +31,30 @@ namespace command { /** - * @class ServerTopic - * @brief Implementation of server-topic transport command. + * \class ServerTopic + * \brief Implementation of server-topic transport command. */ class ServerTopic : public RemoteCommand { public: ServerTopic(); /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::args + * \copydoc RemoteCommand::args */ std::vector<Arg> args() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const override; /** - * @copydoc RemoteCommand::exec + * \copydoc RemoteCommand::exec */ json::Value exec(Irccd &irccd, const json::Value &request) const override; };
--- a/lib/irccd/cmd-watch.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/cmd-watch.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CMD_WATCH_HPP /** - * @file cmd-watch.hpp - * @brief Implementation of irccdctl watch. + * \file cmd-watch.hpp + * \brief Implementation of irccdctl watch. */ #include "command.hpp" @@ -31,8 +31,8 @@ namespace command { /** - * @class Watch - * @brief Implementation of irccdctl watch. + * \class Watch + * \brief Implementation of irccdctl watch. */ class Watch : public RemoteCommand { public: @@ -41,12 +41,12 @@ std::vector<Option> options() const override; /** - * @copydoc RemoteCommand::help + * \copydoc RemoteCommand::help */ std::string help() const override; /** - * @copydoc RemoteCommand::request + * \copydoc RemoteCommand::request */ json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &request) const override; };
--- a/lib/irccd/command.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/command.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_COMMAND_HPP /** - * @file command.hpp - * @brief Remote commands. + * \file command.hpp + * \brief Remote commands. */ #include <cassert> @@ -36,7 +36,7 @@ class Irccdctl; /** - * @brief Command line arguments to irccdctl. + * \brief Command line arguments to irccdctl. * * This class contains the resolved arguments from command line that can apply to the command. */ @@ -60,8 +60,8 @@ /** * Construct the request. * - * @param options the options - * @param args the arguments + * \param options the options + * \param args the arguments */ inline RemoteCommandRequest(Options options, Args args) noexcept : m_options(std::move(options)) @@ -72,7 +72,7 @@ /** * Get the arguments. * - * @return the arguments + * \return the arguments */ inline const Args &args() const noexcept { @@ -82,7 +82,7 @@ /** * Get the options. * - * @return the options + * \return the options */ inline const Options &options() const noexcept { @@ -92,7 +92,7 @@ /** * Get the number of arguments. * - * @return the number of arguments + * \return the number of arguments */ inline unsigned length() const noexcept { @@ -102,8 +102,8 @@ /** * Check if the request has the given option id. * - * @param option the option id - * @return true if the option is available + * \param option the option id + * \return true if the option is available */ inline bool has(const std::string &option) const noexcept { @@ -113,9 +113,9 @@ /** * Get the argument at the specified index. * - * @pre index < length() - * @param index the argument index - * @return the argument + * \pre index < length() + * \param index the argument index + * \return the argument */ inline const std::string &arg(unsigned index) const noexcept { @@ -127,9 +127,9 @@ /** * Get the argument or default value if not available. * - * @param index the index - * @param defaultValue the value if index is out of range - * @return the argument + * \param index the index + * \param defaultValue the value if index is out of range + * \return the argument */ inline std::string argOr(unsigned index, std::string defaultValue) const noexcept { @@ -139,9 +139,9 @@ /** * Get the given option by its id. * - * @pre has(key) - * @param key the option id - * @return the option + * \pre has(key) + * \param key the option id + * \return the option */ inline const std::string &option(const std::string &key) const noexcept { @@ -153,9 +153,9 @@ /** * Get the given option by its id or defaultValue if not found. * - * @param key the option id - * @param defaultValue the value replacement - * @return the option + * \param key the option id + * \param defaultValue the value replacement + * \return the option */ inline std::string optionOr(const std::string &key, std::string defaultValue) const noexcept { @@ -169,7 +169,7 @@ }; /** - * @brief Invokable command. + * \brief Invokable command. * * A remote command is a invokable command in the irccd daemon. You can register dynamically any remote command you * like using Application::addCommand. @@ -192,12 +192,12 @@ class RemoteCommand { public: /** - * @brief Defines available options for this command. + * \brief Defines available options for this command. */ class Option; /** - * @brief Defines available arguments for this command. + * \brief Defines available arguments for this command. */ class Arg; @@ -210,11 +210,11 @@ /** * Create the remote command. * - * @pre name must not be empty - * @pre category must not be empty - * @param name the command name (e.g. server-list) - * @param category the category (e.g. Server) - * @param visible true if the command should be visible without verbosity + * \pre name must not be empty + * \pre category must not be empty + * \param name the command name (e.g. server-list) + * \param category the category (e.g. Server) + * \param visible true if the command should be visible without verbosity */ inline RemoteCommand(std::string name, std::string category, bool visible = true) noexcept : m_name(std::move(name)) @@ -233,7 +233,7 @@ /** * Return the command name, must not have spaces. * - * @return the command name + * \return the command name */ inline const std::string &name() const noexcept { @@ -245,7 +245,7 @@ * * Irccdctl will sort commands by categories. * - * @return the category + * \return the category */ inline const std::string &category() const noexcept { @@ -255,7 +255,7 @@ /** * Hide the command in non-verbose mode. * - * @return true if the command should be visible in non-verbose mode + * \return true if the command should be visible in non-verbose mode */ inline bool visible() const noexcept { @@ -265,21 +265,21 @@ /** * Return the command documentation usage. * - * @return the usage + * \return the usage */ std::string usage() const; /** * Return the help message. * - * @return the help message + * \return the help message */ virtual std::string help() const = 0; /** * Get the supported irccdctl options. * - * @return the options + * \return the options */ virtual std::vector<Option> options() const { @@ -289,7 +289,7 @@ /** * Get the supported arguments. * - * @return the arguments + * \return the arguments */ virtual std::vector<Arg> args() const { @@ -299,14 +299,14 @@ /** * Get the minimum number of arguments required. * - * @return the minimum + * \return the minimum */ unsigned min() const noexcept; /** * Get the maximum number of arguments required. * - * @return the maximum + * \return the maximum */ unsigned max() const noexcept; @@ -317,10 +317,10 @@ * * The default implementation just send the command name with no arguments. * - * @param irccdctl the irccdctl instance - * @param args the command line arguments and options - * @return the JSON object to send to the daemon - * @post the returned JSON value must be an object + * \param irccdctl the irccdctl instance + * \param args the command line arguments and options + * \return the JSON object to send to the daemon + * \post the returned JSON value must be an object */ virtual json::Value request(Irccdctl &irccdctl, const RemoteCommandRequest &args) const; @@ -334,9 +334,9 @@ * * If any exception is thrown from this function, it is forwarded to the client as error status. * - * @param irccd the instance - * @param request the JSON request - * @return the response + * \param irccd the instance + * \param request the JSON request + * \return the response */ virtual json::Value exec(Irccd &irccd, const json::Value &request) const; @@ -345,14 +345,14 @@ * * This default implementation just check for an error string and shows it if any. * - * @param irccdctl the irccdctl instan e - * @param response the JSON response + * \param irccdctl the irccdctl instan e + * \param response the JSON response */ virtual void result(Irccdctl &irccdctl, const json::Value &response) const; }; /** - * @brief Option description for a command. + * \brief Option description for a command. */ class RemoteCommand::Option { private: @@ -370,14 +370,14 @@ * * If arg is not empty, the option takes an argument. * - * @pre id must not be empty - * @pre at least simpleKey or longKey must not be empty - * @pre description must not be empty - * @param id the option id - * @param simpleKey the key the option key - * @param longKey the long option name - * @param arg the argument name if needed - * @param description the description + * \pre id must not be empty + * \pre at least simpleKey or longKey must not be empty + * \pre description must not be empty + * \param id the option id + * \param simpleKey the key the option key + * \param longKey the long option name + * \param arg the argument name if needed + * \param description the description */ inline Option(std::string id, std::string simpleKey, @@ -398,7 +398,7 @@ /** * Get the id. * - * @return the id + * \return the id */ inline const std::string &id() const noexcept { @@ -408,7 +408,7 @@ /** * Get the option key. * - * @return the key + * \return the key */ inline const std::string &simpleKey() const noexcept { @@ -418,7 +418,7 @@ /** * Get the long option. * - * @return the long option + * \return the long option */ inline const std::string &longKey() const noexcept { @@ -428,7 +428,7 @@ /** * Get the option description. * - * @return the description + * \return the description */ inline const std::string &description() const noexcept { @@ -438,7 +438,7 @@ /** * Get the option argument name. * - * @return the argument name if any + * \return the argument name if any */ inline const std::string &arg() const noexcept { @@ -447,7 +447,7 @@ }; /** - * @brief Argument description for command. + * \brief Argument description for command. */ class RemoteCommand::Arg { private: @@ -458,8 +458,8 @@ /** * Construct an argument. * - * @param name the name - * @param required true if the argument is required + * \param name the name + * \param required true if the argument is required */ inline Arg(std::string name, bool required) noexcept : m_name(std::move(name)) @@ -470,7 +470,7 @@ /** * Get the argument name. * - * @return the name + * \return the name */ inline const std::string &name() const noexcept { @@ -480,7 +480,7 @@ /** * Tells if the argument is required. * - * @return true if required + * \return true if required */ inline bool required() const noexcept {
--- a/lib/irccd/config.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/config.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CONFIG_HPP /** - * @file config.hpp - * @brief Read .ini configuration file for irccd + * \file config.hpp + * \brief Read .ini configuration file for irccd */ #include <irccd/options.hpp> @@ -38,8 +38,8 @@ class Irccd; /** - * @class Config - * @brief Read .ini configuration file for irccd + * \class Config + * \brief Read .ini configuration file for irccd */ class Config { private: @@ -68,14 +68,14 @@ * Construct the configuration file loader. If path is empty, then the configuration file is searched through * the standard directories. * - * @param options the option parsed at command line + * \param options the option parsed at command line */ Config(parser::Result options) noexcept; /** * Load the config into irccd. * - * @param irccd the irccd instance + * \param irccd the irccd instance */ void load(Irccd &irccd); };
--- a/lib/irccd/connection.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/connection.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_CONNECTION_HPP /** - * @file connection.hpp - * @brief Connection to irccd instance. + * \file connection.hpp + * \brief Connection to irccd instance. */ #include <cassert> @@ -37,8 +37,8 @@ namespace irccd { /** - * @class Connection - * @brief Abstract class for connecting to irccd from Ip or Local addresses. + * \class Connection + * \brief Abstract class for connecting to irccd from Ip or Local addresses. */ class Connection { protected: @@ -69,43 +69,43 @@ /** * Wait for the next requested response. * - * @param name the response name - * @param timeout the optional timeout - * @return the object - * @throw net::Error on errors or on timeout + * \param name the response name + * \param timeout the optional timeout + * \return the object + * \throw net::Error on errors or on timeout */ json::Value next(const std::string &name, int timeout = 30000); /** * Just wait if the operation succeeded. * - * @param name the response name - * @param timeout the timeout + * \param name the response name + * \param timeout the timeout */ void verify(const std::string &name, int timeout = 30000); /** * Check if the socket is still connected. * - * @return true if connected + * \return true if connected */ virtual bool isConnected() const noexcept = 0; /** * Try to connect to the host. * - * @param timeout the maximum time in milliseconds - * @throw net::Error on errors or timeout + * \param timeout the maximum time in milliseconds + * \throw net::Error on errors or timeout */ virtual void connect(int timeout = 30000) = 0; /** * Try to send the message in 30 seconds. The message must not end with \\r\\n\\r\\n, it is added automatically. * - * @pre msg must not be empty - * @param msg the message to send - * @param timeout the maximum time in milliseconds - * @throw net::Error on errors + * \pre msg must not be empty + * \param msg the message to send + * \param timeout the maximum time in milliseconds + * \throw net::Error on errors */ virtual void send(std::string msg, int timeout = 30000) = 0; @@ -114,16 +114,16 @@ * * This functions throws if the connection is lost. * - * @param timeout the maximum time in milliseconds - * @return the next event - * @throw net::Error on errors or disconnection + * \param timeout the maximum time in milliseconds + * \return the next event + * \throw net::Error on errors or disconnection */ virtual json::Value next(int timeout = 30000) = 0; }; /** - * @class ConnectionBase - * @brief Implementation for Ip or Local. + * \class ConnectionBase + * \brief Implementation for Ip or Local. */ template <typename Address> class ConnectionBase : public Connection { @@ -139,7 +139,7 @@ /** * Construct the socket but do not connect immediately. * - * @param address the address + * \param address the address */ ConnectionBase(Address address) : m_address(std::move(address)) @@ -149,7 +149,7 @@ } /** - * @copydoc Connection::isConnected + * \copydoc Connection::isConnected */ bool isConnected() const noexcept override { @@ -157,17 +157,17 @@ } /** - * @copydoc Connection::connect + * \copydoc Connection::connect */ void connect(int timeout) override; /** - * @copydoc Connection::send + * \copydoc Connection::send */ void send(std::string msg, int timeout) override; /** - * @copydoc Connection::next + * \copydoc Connection::next */ json::Value next(int timeout) override; };
--- a/lib/irccd/elapsed-timer.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/elapsed-timer.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_ELAPSED_TIMER_HPP /** - * @file elapsed-timer.hpp - * @brief Measure elapsed time + * \file elapsed-timer.hpp + * \brief Measure elapsed time */ #include <chrono> @@ -29,8 +29,8 @@ namespace irccd { /** - * @class ElapsedTimer - * @brief Measure elapsed time + * \class ElapsedTimer + * \brief Measure elapsed time * * This class provides an abstraction to measure elapsed time since the * construction of the object. @@ -75,7 +75,7 @@ /** * Get the number of elapsed milliseconds. * - * @return the milliseconds + * \return the milliseconds */ unsigned elapsed() noexcept; };
--- a/lib/irccd/fs.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/fs.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_FS_HPP /** - * @file fs.hpp - * @brief Filesystem operations made easy. + * \file fs.hpp + * \brief Filesystem operations made easy. * * The following options can be set by the user: * @@ -41,8 +41,8 @@ namespace fs { /** - * @enum Flags - * @brief Flags for readdir. + * \enum Flags + * \brief Flags for readdir. */ enum Flags { Dot = (1 << 0), //!< if set, also lists "." @@ -50,13 +50,13 @@ }; /** - * @class Entry - * @brief Entry in the directory list. + * \class Entry + * \brief Entry in the directory list. */ class Entry { public: /** - * @brief Describe the type of an entry + * \brief Describe the type of an entry */ enum Type : char { Unknown, //!< File type is unknown, @@ -72,25 +72,25 @@ /** * Check if two entries are identical. * - * @param e1 the first entry - * @param e2 the second entry - * @return true if they are identical + * \param e1 the first entry + * \param e2 the second entry + * \return true if they are identical */ bool operator==(const Entry &e1, const Entry &e2) noexcept; /** * Check if two entries are different. * - * @param e1 the first entry - * @param e2 the second entry - * @return true if they are different + * \param e1 the first entry + * \param e2 the second entry + * \return true if they are different */ bool operator!=(const Entry &e1, const Entry &e2) noexcept; /** * Get the separator for that system. * - * @return \ on Windows and / otherwise + * \return \ on Windows and / otherwise */ inline char separator() noexcept { @@ -104,8 +104,8 @@ /** * Clean a path by removing any extra / or \ and add a trailing one. * - * @param path the path - * @return the updated path + * \param path the path + * \return the updated path */ std::string clean(std::string path); @@ -114,8 +114,8 @@ * * Example, baseName("/etc/foo.conf") // foo.conf * - * @param path the path - * @return the base name + * \param path the path + * \return the base name */ std::string baseName(std::string path); @@ -124,17 +124,17 @@ * * Example, dirName("/etc/foo.conf") // /etc * - * @param path the path - * @return the parent directory + * \param path the path + * \return the parent directory */ std::string dirName(std::string path); /** * Get stat information. * - * @param path the path - * @return the stat information - * @throw std::runtime_error on failure + * \param path the path + * \return the stat information + * \throw std::runtime_error on failure */ struct stat stat(const std::string &path); @@ -143,84 +143,84 @@ * * If HAVE_ACCESS is defined, the function access is used, otherwise stat is used. * - * @param path the path to check - * @return true if the path exists + * \param path the path to check + * \return true if the path exists */ bool exists(const std::string &path) noexcept; /** * Check if the path is absolute. * - * @param path the path - * @return true if the path is absolute + * \param path the path + * \return true if the path is absolute */ bool isAbsolute(const std::string &path) noexcept; /** * Check if the path is relative. * - * @param path the path - * @return true if the path is absolute + * \param path the path + * \return true if the path is absolute */ bool isRelative(const std::string &path) noexcept; /** * Check if the file is readable. * - * @param path the path - * @return true if has read access + * \param path the path + * \return true if has read access */ bool isReadable(const std::string &path) noexcept; /** * Check if the file is writable. * - * @param path the path - * @return true if has write access + * \param path the path + * \return true if has write access */ bool isWritable(const std::string &path) noexcept; /** * Check if the file is a regular file. * - * @param path the path - * @return true if it is a file and false if not or not readable + * \param path the path + * \return true if it is a file and false if not or not readable */ bool isFile(const std::string &path) noexcept; /** * Check if the file is a directory. * - * @param path the path - * @return true if it is a directory and false if not or not readable + * \param path the path + * \return true if it is a directory and false if not or not readable */ bool isDirectory(const std::string &path) noexcept; /** * Check if the file is a symbolic link. * - * @param path the path - * @return true if it is a symbolic link and false if not or not readable + * \param path the path + * \return true if it is a symbolic link and false if not or not readable */ bool isSymlink(const std::string &path) noexcept; /** * Read a directory and return a list of entries (not recursive). * - * @param path the directory path - * @param flags the optional flags (see Flags) - * @return the list of entries - * @throw std::runtime_error on failure + * \param path the directory path + * \param flags the optional flags (see Flags) + * \return the list of entries + * \throw std::runtime_error on failure */ std::vector<Entry> readdir(const std::string &path, int flags = 0); /** * Create a directory recursively. * - * @param path the path - * @param mode the optional mode (not always supported) - * @throw std::runtime_error on failure - * @post all intermediate directories are created + * \param path the path + * \param mode the optional mode (not always supported) + * \throw std::runtime_error on failure + * \post all intermediate directories are created */ void mkdir(const std::string &path, int mode = 0700); @@ -229,7 +229,7 @@ * * If errors happens, they are silently discarded to remove as much as possible. * - * @param path the path + * \param path the path */ void rmdir(const std::string &path) noexcept; @@ -243,10 +243,10 @@ * - base is the current parent directory in the tree * - entry is the current entry * - * @param base the base directory - * @param predicate the predicate - * @return the full path name to the file or empty string if never found - * @throw std::runtime_error on read errors + * \param base the base directory + * \param predicate the predicate + * \return the full path name to the file or empty string if never found + * \throw std::runtime_error on read errors */ template <typename Predicate> std::string findIf(const std::string &base, Predicate &&predicate) @@ -282,10 +282,10 @@ /** * Find a file by name recursively. * - * @param base the base directory - * @param name the file name - * @return the full path name to the file or empty string if never found - * @throw std::runtime_error on read errors + * \param base the base directory + * \param name the file name + * \return the full path name to the file or empty string if never found + * \throw std::runtime_error on read errors */ inline std::string find(const std::string &base, const std::string &name) { @@ -295,10 +295,10 @@ /** * Overload by regular expression. * - * @param base the base directory - * @param regex the regular expression - * @return the full path name to the file or empty string if never found - * @throw std::runtime_error on read errors + * \param base the base directory + * \param regex the regular expression + * \return the full path name to the file or empty string if never found + * \throw std::runtime_error on read errors */ inline std::string find(const std::string &base, const std::regex ®ex) { @@ -308,8 +308,8 @@ /** * Get the current working directory. * - * @return the current working directory - * @throw std::runtime_error on failure + * \return the current working directory + * \throw std::runtime_error on failure */ std::string cwd();
--- a/lib/irccd/ini.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/ini.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_INI_HPP /** - * @file ini.hpp - * @brief Configuration file parser. + * \file ini.hpp + * \brief Configuration file parser. */ #include <algorithm> @@ -40,8 +40,8 @@ class Document; /** - * @class Error - * @brief Error in a file + * \class Error + * \brief Error in a file */ class Error : public std::exception { private: @@ -53,9 +53,9 @@ /** * Constructor. * - * @param l the line - * @param c the column - * @param m the message + * \param l the line + * \param c the column + * \param m the message */ inline Error(int l, int c, std::string m) noexcept : m_line(l) @@ -67,7 +67,7 @@ /** * Get the line number. * - * @return the line + * \return the line */ inline int line() const noexcept { @@ -77,7 +77,7 @@ /** * Get the column number. * - * @return the column + * \return the column */ inline int column() const noexcept { @@ -87,7 +87,7 @@ /** * Return the raw error message (no line and column shown). * - * @return the error message + * \return the error message */ const char *what() const noexcept override { @@ -96,17 +96,17 @@ }; /** - * @class Token - * @brief Describe a token read in the .ini source + * \class Token + * \brief Describe a token read in the .ini source * * This class can be used when you want to parse a .ini file yourself. * - * @see Document::analyze + * \see Document::analyze */ class Token { public: /** - * @brief Token type + * \brief Token type */ enum Type { Include, //!< include statement @@ -129,10 +129,10 @@ /** * Construct a token. * - * @param type the type - * @param line the line - * @param column the column - * @param value the value + * \param type the type + * \param line the line + * \param column the column + * \param value the value */ Token(Type type, int line, int column, std::string value = "") noexcept : m_type(type) @@ -168,7 +168,7 @@ /** * Get the type. * - * @return the type + * \return the type */ inline Type type() const noexcept { @@ -178,7 +178,7 @@ /** * Get the line. * - * @return the line + * \return the line */ inline int line() const noexcept { @@ -188,7 +188,7 @@ /** * Get the column. * - * @return the column + * \return the column */ inline int column() const noexcept { @@ -199,7 +199,7 @@ * Get the value. For words, quoted words and section, the value is the content. Otherwise it's the * characters parsed. * - * @return the value + * \return the value */ inline const std::string &value() const noexcept { @@ -213,8 +213,8 @@ using Tokens = std::vector<Token>; /** - * @class Option - * @brief Option definition. + * \class Option + * \brief Option definition. */ class Option : public std::vector<std::string> { private: @@ -224,8 +224,8 @@ /** * Construct an empty option. * - * @param key the key - * @param value the value + * \param key the key + * \param value the value */ inline Option(std::string key) noexcept : std::vector<std::string>() @@ -236,8 +236,8 @@ /** * Construct a single option. * - * @param key the key - * @param value the value + * \param key the key + * \param value the value */ inline Option(std::string key, std::string value) noexcept : m_key(std::move(key)) @@ -248,8 +248,8 @@ /** * Construct a list option. * - * @param key the key - * @param values the values + * \param key the key + * \param values the values */ inline Option(std::string key, std::vector<std::string> values) noexcept : std::vector<std::string>(std::move(values)) @@ -260,7 +260,7 @@ /** * Get the option key. * - * @return the key + * \return the key */ inline const std::string &key() const noexcept { @@ -270,7 +270,7 @@ /** * Get the option value. * - * @return the value + * \return the value */ inline const std::string &value() const noexcept { @@ -281,8 +281,8 @@ }; /** - * @class Section - * @brief Section that contains one or more options. + * \class Section + * \brief Section that contains one or more options. */ class Section : public std::vector<Option> { private: @@ -292,7 +292,7 @@ /** * Construct a section with its name. * - * @param key the key + * \param key the key */ inline Section(std::string key) noexcept : m_key(std::move(key)) @@ -302,7 +302,7 @@ /** * Get the section key. * - * @return the key + * \return the key */ inline const std::string &key() const noexcept { @@ -312,8 +312,8 @@ /** * Check if the section contains a specific option. * - * @param key the option key - * @return true if the option exists + * \param key the option key + * \return true if the option exists */ inline bool contains(const std::string &key) const noexcept { @@ -323,9 +323,9 @@ /** * Access an option at the specified key. * - * @param key the key - * @return the option - * @throw std::out_of_range if the key does not exist + * \param key the key + * \return the option + * \throw std::out_of_range if the key does not exist */ inline Option &operator[](const std::string &key) { @@ -335,9 +335,9 @@ /** * Access an option at the specified key. * - * @param key the key - * @return the option - * @throw std::out_of_range if the key does not exist + * \param key the key + * \return the option + * \throw std::out_of_range if the key does not exist */ inline const Option &operator[](const std::string &key) const { @@ -347,8 +347,8 @@ /** * Find an option by key and return an iterator. * - * @param key the key - * @return the iterator or end() if not found + * \param key the key + * \return the iterator or end() if not found */ inline iterator find(const std::string &key) noexcept { @@ -360,8 +360,8 @@ /** * Find an option by key and return an iterator. * - * @param key the key - * @return the iterator or end() if not found + * \param key the key + * \return the iterator or end() if not found */ inline const_iterator find(const std::string &key) const noexcept { @@ -377,8 +377,8 @@ }; /** - * @class File - * @brief Source for reading .ini files. + * \class File + * \brief Source for reading .ini files. */ class File { public: @@ -389,9 +389,9 @@ }; /** - * @class Buffer - * @brief Source for reading ini from text. - * @note the include statement is not supported with buffers. + * \class Buffer + * \brief Source for reading ini from text. + * \note the include statement is not supported with buffers. */ class Buffer { public: @@ -402,8 +402,8 @@ }; /** - * @class Document - * @brief Ini config file loader + * \class Document + * \brief Ini config file loader */ class Document : public std::vector<Section> { private: @@ -417,48 +417,48 @@ * For example, this class does not allow adding options under no sections and this function will not * detect that issue. * - * @param file the file to read - * @return the list of tokens - * @throws Error on errors + * \param file the file to read + * \return the list of tokens + * \throws Error on errors */ static Tokens analyze(const File &file); /** * Overloaded function for buffers. * - * @param buffer the buffer to read - * @return the list of tokens - * @throws Error on errors + * \param buffer the buffer to read + * \return the list of tokens + * \throws Error on errors */ static Tokens analyze(const Buffer &buffer); /** * Show all tokens and their description. * - * @param tokens the tokens + * \param tokens the tokens */ static void dump(const Tokens &tokens); /** * Construct a document from a file. * - * @param file the file to read - * @throws Error on errors + * \param file the file to read + * \throws Error on errors */ Document(const File &file); /** * Overloaded constructor for buffers. * - * @param buffer the buffer to read - * @throws Error on errors + * \param buffer the buffer to read + * \throws Error on errors */ Document(const Buffer &buffer); /** * Get the current document path, only useful when constructed from File source. * - * @return the path + * \return the path */ inline const std::string &path() const noexcept { @@ -468,7 +468,7 @@ /** * Check if a document has a specific section. * - * @param key the key + * \param key the key */ inline bool contains(const std::string &key) const noexcept { @@ -478,9 +478,9 @@ /** * Access a section at the specified key. * - * @param key the key - * @return the section - * @throw std::out_of_range if the key does not exist + * \param key the key + * \return the section + * \throw std::out_of_range if the key does not exist */ inline Section &operator[](const std::string &key) { @@ -490,9 +490,9 @@ /** * Access a section at the specified key. * - * @param key the key - * @return the section - * @throw std::out_of_range if the key does not exist + * \param key the key + * \return the section + * \throw std::out_of_range if the key does not exist */ inline const Section &operator[](const std::string &key) const { @@ -502,8 +502,8 @@ /** * Find a section by key and return an iterator. * - * @param key the key - * @return the iterator or end() if not found + * \param key the key + * \return the iterator or end() if not found */ inline iterator find(const std::string &key) noexcept { @@ -515,8 +515,8 @@ /** * Find a section by key and return an iterator. * - * @param key the key - * @return the iterator or end() if not found + * \param key the key + * \return the iterator or end() if not found */ inline const_iterator find(const std::string &key) const noexcept {
--- a/lib/irccd/irccd.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/irccd.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_HPP /** - * @file irccd.hpp - * @brief Base class for irccd front end. + * \file irccd.hpp + * \brief Base class for irccd front end. */ #include <atomic> @@ -72,8 +72,8 @@ using Rules = std::vector<Rule>; /** - * @class ServerEvent - * @brief Structure that owns several informations about an IRC event + * \class ServerEvent + * \brief Structure that owns several informations about an IRC event * * This structure is used to dispatch the IRC event to the plugins and the transports. */ @@ -114,8 +114,8 @@ #endif /** - * @class Irccd - * @brief Irccd main instance + * \class Irccd + * \brief Irccd main instance * * This class is used as the main application event loop, it stores servers, plugins and transports. * @@ -227,7 +227,7 @@ /** * Load a configuration into irccd. Added as convenience to allow expressions like `irccd.load(Config{"foo"})`. * - * @param config the configuration loader + * \param config the configuration loader */ template <typename T> inline void load(T &&config) @@ -239,8 +239,8 @@ * Add an event to the queue. This will immediately signals the event loop to interrupt itself to dispatch * the pending events. * - * @param ev the event - * @note Thread-safe + * \param ev the event + * \note Thread-safe */ void post(Event ev) noexcept; @@ -248,7 +248,7 @@ * This function wraps post() to iterate over all plugins to call the function and to send to all * connected transport the event. * - * @param ev the event + * \param ev the event */ void postServerEvent(ServerEvent ev) noexcept; @@ -262,8 +262,8 @@ /** * Add an identity. * - * @param identity the identity - * @note If the identity already exists, it is overriden + * \param identity the identity + * \note If the identity already exists, it is overriden */ inline void addIdentity(ServerIdentity identity) noexcept { @@ -273,8 +273,8 @@ /** * Get an identity, if not found, the default one is used. * - * @param name the identity name - * @return the identity or default one + * \param name the identity name + * \return the identity or default one */ inline ServerIdentity findIdentity(const std::string &name) const noexcept { @@ -295,8 +295,8 @@ /** * Check if a server exists. * - * @param name the name - * @return true if exists + * \param name the name + * \return true if exists */ inline bool hasServer(const std::string &name) const noexcept { @@ -306,32 +306,32 @@ /** * Add a new server to the application. * - * @pre hasServer must return false - * @param sv the server + * \pre hasServer must return false + * \param sv the server */ void addServer(std::shared_ptr<Server> sv) noexcept; /** * Get a server or empty one if not found * - * @param name the server name - * @return the server or empty one if not found + * \param name the server name + * \return the server or empty one if not found */ std::shared_ptr<Server> getServer(const std::string &name) const noexcept; /** * Find a server by name. * - * @param name the server name - * @return the server - * @throw std::out_of_range if the server does not exist + * \param name the server name + * \return the server + * \throw std::out_of_range if the server does not exist */ std::shared_ptr<Server> requireServer(const std::string &name) const; /** * Get the map of loaded servers. * - * @return the servers + * \return the servers */ inline const Servers &servers() const noexcept { @@ -343,7 +343,7 @@ * * The server if any, will be disconnected. * - * @param name the server name + * \param name the server name */ void removeServer(const std::string &name); @@ -364,7 +364,7 @@ /** * Add a transport server. * - * @param ts the transport server + * \param ts the transport server */ void addTransport(std::shared_ptr<TransportServer> ts); @@ -379,8 +379,8 @@ /** * Check if a plugin is loaded. * - * @param name the plugin id - * @return true if has plugin + * \param name the plugin id + * \return true if has plugin */ inline bool hasPlugin(const std::string &name) const noexcept { @@ -390,25 +390,25 @@ /** * Get a plugin or empty one if not found. * - * @param name the plugin id - * @return the plugin or empty one if not found + * \param name the plugin id + * \return the plugin or empty one if not found */ std::shared_ptr<Plugin> getPlugin(const std::string &name) const noexcept; /** * Find a plugin. * - * @param name the plugin id - * @return the plugin - * @throws std::out_of_range if not found + * \param name the plugin id + * \return the plugin + * \throws std::out_of_range if not found */ std::shared_ptr<Plugin> requirePlugin(const std::string &name) const; /** * Add plugin configuration for the specified plugin. * - * @param name - * @param config + * \param name + * \param config */ inline void addPluginConfig(std::string name, PluginConfig config) { @@ -421,8 +421,8 @@ * Plugins signals will be connected to the irccd main loop. The onLoad function will also be called and the * plugin is not added on errors. * - * @pre plugin must not be empty - * @param plugin the plugin + * \pre plugin must not be empty + * \param plugin the plugin */ void addPlugin(std::shared_ptr<Plugin> plugin); @@ -431,30 +431,30 @@ * * TODO: Move this somewhere else (e.g. Plugin::find). * - * @param source the path or the plugin id to search - * @param find set to true for searching by id + * \param source the path or the plugin id to search + * \param find set to true for searching by id */ void loadPlugin(std::string name, const std::string &source, bool find); /** * Unload a plugin and remove it. * - * @param name the plugin id + * \param name the plugin id */ void unloadPlugin(const std::string &name); /** * Reload a plugin by calling onReload. * - * @param name the plugin name - * @throw std::exception on failures + * \param name the plugin name + * \throw std::exception on failures */ void reloadPlugin(const std::string &name); /** * Get the map of plugins. * - * @return the map of plugins + * \return the map of plugins */ inline const Plugins &plugins() const noexcept { @@ -474,7 +474,7 @@ /** * Append a rule. * - * @param rule the rule to append + * \param rule the rule to append */ inline void addRule(Rule rule) { @@ -484,8 +484,8 @@ /** * Insert a new rule at the specified position. * - * @param rule the rule - * @param position the position + * \param rule the rule + * \param position the position */ inline void insertRule(Rule rule, unsigned position) { @@ -497,7 +497,7 @@ /** * Get the list of rules. * - * @return the list of rules + * \return the list of rules */ inline const std::vector<Rule> &rules() const noexcept { @@ -507,8 +507,8 @@ /** * Remove a new rule from the specified position. * - * @pre position must be valid - * @param position the position + * \pre position must be valid + * \param position the position */ inline void removeRule(unsigned position) {
--- a/lib/irccd/irccdctl.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/irccdctl.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_IRCCDCTL_HPP /** - * @file irccdctl.hpp - * @brief Base class for irccdctl front end. + * \file irccdctl.hpp + * \brief Base class for irccdctl front end. */ #include <cassert> @@ -45,7 +45,7 @@ } // !ini /** - * @brief Main irccdctl class. + * \brief Main irccdctl class. */ class Irccdctl : public Application { private: @@ -81,30 +81,30 @@ /** * Execute the given command and wait for its result. * - * @param cmd the command - * @param args the arguments + * \param cmd the command + * \param args the arguments */ void exec(const RemoteCommand &cmd, std::vector<std::string> args); /** * Execute the given alias. * - * @param alias the alias - * @param args the arguments + * \param alias the alias + * \param args the arguments */ void exec(const Alias &alias, std::vector<std::string> args); /** * Resolve the command line arguments. * - * @param args the main arguments + * \param args the main arguments */ void exec(std::vector<std::string> args); /** * Get the connection. * - * @return the connection + * \return the connection */ inline Connection &connection() noexcept { @@ -114,8 +114,8 @@ /** * Run the irccdctl front end. * - * @param argc the number of arguments - * @param argv the arguments + * \param argc the number of arguments + * \param argv the arguments */ void run(int argc, char **argv); };
--- a/lib/irccd/js-directory.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/js-directory.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_JS_DIRECTORY_HPP /** - * @file js-directory.hpp - * @brief Irccd.Directory JavaScript API. + * \file js-directory.hpp + * \brief Irccd.Directory JavaScript API. */ #include "js.hpp" @@ -31,7 +31,7 @@ /** * Load the module. * - * @param ctx the context. + * \param ctx the context. */ void loadJsDirectory(duk::ContextPtr ctx) noexcept;
--- a/lib/irccd/js-elapsed-timer.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/js-elapsed-timer.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_JS_ELAPSED_TIMER_HPP /** - * @file js-elapsed-timer.hpp - * @brief Irccd.ElapsedTimer JavaScript API. + * \file js-elapsed-timer.hpp + * \brief Irccd.ElapsedTimer JavaScript API. */ #include "js.hpp" @@ -31,7 +31,7 @@ /** * Load the module. * - * @param ctx the context. + * \param ctx the context. */ void loadJsElapsedTimer(duk::ContextPtr ctx) noexcept;
--- a/lib/irccd/js-file.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/js-file.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_JS_FILE_HPP /** - * @file js-file.hpp - * @brief Irccd.File JavaScript API. + * \file js-file.hpp + * \brief Irccd.File JavaScript API. */ #include <cassert> @@ -37,8 +37,8 @@ namespace irccd { /** - * @class File - * @brief Object for Javascript to perform I/O. + * \class File + * \brief Object for Javascript to perform I/O. * * This class can be constructed to Javascript. * @@ -64,9 +64,9 @@ /** * Construct a file specified by path * - * @param path the path - * @param mode the mode string (for std::fopen) - * @throw std::runtime_error on failures + * \param path the path + * \param mode the mode string (for std::fopen) + * \throw std::runtime_error on failures */ inline File(std::string path, const std::string &mode) : m_path(std::move(path)) @@ -81,9 +81,9 @@ * * The class takes ownership of fp and will close it. * - * @pre destructor must not be null - * @param fp the file pointer - * @param destructor the function to close fp (e.g. std::fclose) + * \pre destructor must not be null + * \param fp the file pointer + * \param destructor the function to close fp (e.g. std::fclose) */ inline File(std::FILE *fp, std::function<void (std::FILE *)> destructor) noexcept : m_stream(fp) @@ -103,8 +103,8 @@ /** * Get the path. * - * @return the path - * @warning empty when constructed from the FILE constructor + * \return the path + * \warning empty when constructed from the FILE constructor */ inline const std::string &path() const noexcept { @@ -114,7 +114,7 @@ /** * Get the handle. * - * @return the handle or nullptr if the stream was closed + * \return the handle or nullptr if the stream was closed */ inline std::FILE *handle() noexcept { @@ -136,7 +136,7 @@ namespace duk { /** - * @brief JavaScript binding for File. + * \brief JavaScript binding for File. */ template <> class TypeTraits<File> { @@ -144,7 +144,7 @@ /** * Push the File prototype. * - * @param ctx the context + * \param ctx the context */ static inline void prototype(ContextPtr ctx) { @@ -158,7 +158,7 @@ /** * Get the File signature. * - * @return File + * \return File */ static inline std::string name() { @@ -168,7 +168,7 @@ /** * Get the inheritance list. * - * @return empty + * \return empty */ static inline std::vector<std::string> inherits() { @@ -181,7 +181,7 @@ /** * Load the module. * - * @param ctx the context. + * \param ctx the context. */ void loadJsFile(duk::ContextPtr ctx);
--- a/lib/irccd/js-irccd.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/js-irccd.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_JS_IRCCD_HPP /** - * @file js-irccd.hpp - * @brief Irccd.Irccd JavaScript API. + * \file js-irccd.hpp + * \brief Irccd.Irccd JavaScript API. */ #include <cerrno> @@ -32,7 +32,7 @@ namespace irccd { /** - * @brief Custom JavaScript exception for system error. + * \brief Custom JavaScript exception for system error. */ class SystemError { private: @@ -48,15 +48,15 @@ /** * Create a system error with the given errno and message. * - * @param e the errno number - * @param message the message + * \param e the errno number + * \param message the message */ SystemError(int e, std::string message); /** * Raise the SystemError. * - * @param ctx the context + * \param ctx the context */ void raise(duk::ContextPtr ctx) const; }; @@ -64,7 +64,7 @@ /** * Load the module. * - * @param ctx the context. + * \param ctx the context. */ void loadJsIrccd(duk::Context &ctx);
--- a/lib/irccd/js-logger.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/js-logger.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_JS_LOGGER_HPP /** - * @file js-logger.hpp - * @brief Irccd.Logger JavaScript API. + * \file js-logger.hpp + * \brief Irccd.Logger JavaScript API. */ #include "js.hpp" @@ -31,7 +31,7 @@ /** * Load the module. * - * @param ctx the context. + * \param ctx the context. */ void loadJsLogger(duk::ContextPtr ctx);
--- a/lib/irccd/js-plugin.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/js-plugin.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_JS_PLUGIN_HPP /** - * @file js-plugin.hpp - * @brief Irccd.Plugin JavaScript API. + * \file js-plugin.hpp + * \brief Irccd.Plugin JavaScript API. */ #include "js.hpp" @@ -31,7 +31,7 @@ /** * Load the module. * - * @param ctx the context. + * \param ctx the context. */ void loadJsPlugin(duk::Context &ctx) noexcept;
--- a/lib/irccd/js-server.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/js-server.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_JS_SERVER_HPP /** - * @file js-server.hpp - * @brief Irccd.Server JavaScript API. + * \file js-server.hpp + * \brief Irccd.Server JavaScript API. */ #include <irccd/server.hpp> @@ -33,7 +33,7 @@ namespace duk { /** - * @brief JavaScript binding for Server. + * \brief JavaScript binding for Server. */ template <> class TypeTraits<irccd::Server> { @@ -41,7 +41,7 @@ /** * Push the Server prototype. * - * @param ctx the context + * \param ctx the context */ static inline void prototype(ContextPtr ctx) { @@ -55,7 +55,7 @@ /** * Get the Server signature. * - * @return Server + * \return Server */ static inline std::string name() { @@ -65,7 +65,7 @@ /** * Get the inheritance list. * - * @return empty + * \return empty */ static inline std::vector<std::string> inherits() { @@ -78,7 +78,7 @@ /** * Load the module. * - * @param ctx the context. + * \param ctx the context. */ void loadJsServer(duk::ContextPtr ctx);
--- a/lib/irccd/js-system.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/js-system.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_JS_SYSTEM_HPP /** - * @file js-system.hpp - * @brief Irccd.System JavaScript API. + * \file js-system.hpp + * \brief Irccd.System JavaScript API. */ #include "js.hpp" @@ -31,7 +31,7 @@ /** * Load the module. * - * @param ctx the context. + * \param ctx the context. */ void loadJsSystem(duk::ContextPtr ctx);
--- a/lib/irccd/js-timer.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/js-timer.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_JS_TIMER_HPP /** - * @file js-timer.hpp - * @brief Irccd.Timer JavaScript API. + * \file js-timer.hpp + * \brief Irccd.Timer JavaScript API. */ #include "js.hpp" @@ -31,7 +31,7 @@ /** * Load the module. * - * @param ctx the context. + * \param ctx the context. */ void loadJsTimer(duk::ContextPtr ctx) noexcept;
--- a/lib/irccd/js-unicode.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/js-unicode.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_JS_UNICODE_HPP /** - * @file js-unicode.hpp - * @brief Irccd.Unicode JavaScript API. + * \file js-unicode.hpp + * \brief Irccd.Unicode JavaScript API. */ #include "js.hpp" @@ -31,7 +31,7 @@ /** * Load the module. * - * @param ctx the context. + * \param ctx the context. */ void loadJsUnicode(duk::ContextPtr ctx);
--- a/lib/irccd/js-util.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/js-util.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_JS_UTIL_HPP /** - * @file js-util.hpp - * @brief Irccd.Util JavaScript API. + * \file js-util.hpp + * \brief Irccd.Util JavaScript API. */ #include "js.hpp" @@ -31,7 +31,7 @@ /** * Load the module. * - * @param ctx the context. + * \param ctx the context. */ void loadJsUtil(duk::ContextPtr ctx);
--- a/lib/irccd/js.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/js.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_JS_HPP /** - * @file js.hpp - * @brief Bring JavaScript using Duktape. + * \file js.hpp + * \brief Bring JavaScript using Duktape. * * This file provides usual Duktape function renamed and placed into `duk` namespace. It also replaces error * code with exceptions when possible. @@ -56,8 +56,8 @@ using Size = duk_size_t; /** - * @class StackAssert - * @brief Stack sanity checker. + * \class StackAssert + * \brief Stack sanity checker. * * Instanciate this class where you need to manipulate the Duktape stack outside a Duktape/C function, its destructor * will examinate if the stack size matches the user expected size. @@ -80,8 +80,8 @@ * * No-op if NDEBUG is set. * - * @param ctx the context - * @param expected the size expected relative to the already existing values + * \param ctx the context + * \param expected the size expected relative to the already existing values */ inline StackAssert(ContextPtr ctx, unsigned expected = 0) noexcept #if !defined(NDEBUG) @@ -110,51 +110,51 @@ }; /** - * @class Object - * @brief Empty class tag for push() function. + * \class Object + * \brief Empty class tag for push() function. */ class Object { }; /** - * @class Array - * @brief Empty class tag for push() function. + * \class Array + * \brief Empty class tag for push() function. */ class Array { }; /** - * @class Global - * @brief Empty class tag to push the global object. + * \class Global + * \brief Empty class tag to push the global object. */ class Global { }; /** - * @class Undefined - * @brief Empty class tag to push undefined to the stack. + * \class Undefined + * \brief Empty class tag to push undefined to the stack. */ class Undefined { }; /** - * @class Null - * @brief Empty class tag to push null to the stack. + * \class Null + * \brief Empty class tag to push null to the stack. */ class Null { }; /** - * @class This - * @brief Empty class tag to push this binding to the stack. + * \class This + * \brief Empty class tag to push this binding to the stack. */ class This { }; /** - * @class RawPointer - * @brief Push a non-managed pointer to Duktape, the pointer will never be deleted. - * @note For a managed pointer with prototype, see Pointer + * \class RawPointer + * \brief Push a non-managed pointer to Duktape, the pointer will never be deleted. + * \note For a managed pointer with prototype, see Pointer */ template <typename T> class RawPointer { @@ -166,7 +166,7 @@ }; /** - * @brief Manage shared_ptr from C++ and JavaScript + * \brief Manage shared_ptr from C++ and JavaScript * * This class allowed you to push and retrieve shared_ptr from C++ and JavaScript without taking care of ownership * and deletion. @@ -182,7 +182,7 @@ }; /** - * @brief Manage pointers from C++ and JavaScript + * \brief Manage pointers from C++ and JavaScript * * This class allowed you to push and retrieve C++ pointers from C++ and JavaScript. The object will be deleted when * the JavaScript garbage collectors collect them so never store a pointer created with this. @@ -199,8 +199,8 @@ }; /** - * @class Function - * @brief Duktape/C function definition. + * \class Function + * \brief Duktape/C function definition. * * This class wraps the std::function as a Duktape/C function by storing a copied pointer. */ @@ -229,8 +229,8 @@ using Map = std::unordered_map<std::string, Type>; /** - * @class ErrorInfo - * @brief Error description. + * \class ErrorInfo + * \brief Error description. * * This class fills the fields got in an Error object. */ @@ -245,7 +245,7 @@ /** * Get the error message. This effectively returns message field. * - * @return the message + * \return the message */ const char *what() const noexcept override { @@ -254,8 +254,8 @@ }; /** - * @class TypeTraits - * @brief Type information to implement new types in JavaScript's context. + * \class TypeTraits + * \brief Type information to implement new types in JavaScript's context. * * This class depending on your needs may have the following functions: * @@ -290,8 +290,8 @@ }; /** - * @class Context - * @brief RAII based Duktape handler. + * \class Context + * \brief RAII based Duktape handler. * * This class is implicitly convertible to duk_context for convenience. */ @@ -319,7 +319,7 @@ /** * Convert the context to the native Duktape/C type. * - * @return the duk_context + * \return the duk_context */ inline operator duk_context *() noexcept { @@ -329,7 +329,7 @@ /** * Convert the context to the native Duktape/C type. * - * @return the duk_context + * \return the duk_context */ inline operator duk_context *() const noexcept { @@ -340,9 +340,9 @@ /** * Get the error object when a JavaScript error has been thrown (e.g. eval failure). * - * @param ctx the context - * @param index the index - * @return the information + * \param ctx the context + * \param index the index + * \return the information */ inline ErrorInfo error(ContextPtr ctx, int index) { @@ -368,8 +368,8 @@ /** * Wrapper for [duk_base64_decode](http://duktape.org/api.html#duk_base64_decode). * - * @param ctx the context - * @param index the index + * \param ctx the context + * \param index the index */ inline void base64Decode(ContextPtr ctx, Index index) { @@ -379,8 +379,8 @@ /** * Wrapper for [duk_base64_encode](http://duktape.org/api.html#duk_base64_encode). * - * @param ctx the context - * @param index the index + * \param ctx the context + * \param index the index */ inline void base64Encode(ContextPtr ctx, Index index) { @@ -390,8 +390,8 @@ /** * Wrapper for [duk_call](http://duktape.org/api.html#duk_call). * - * @param ctx the context - * @param nargs the number of arguments + * \param ctx the context + * \param nargs the number of arguments */ inline void call(ContextPtr ctx, Index nargs = 0) { @@ -401,8 +401,8 @@ /** * Wrapper for [duk_call_method](http://duktape.org/api.html#duk_call_method). * - * @param ctx the context - * @param nargs the number of arguments + * \param ctx the context + * \param nargs the number of arguments */ inline void callMethod(ContextPtr ctx, Index nargs = 0) { @@ -412,9 +412,9 @@ /** * Wrapper for [duk_call_prop](http://duktape.org/api.html#duk_call_prop). * - * @param ctx the context - * @param index the object index - * @param nargs the number of arguments + * \param ctx the context + * \param index the object index + * \param nargs the number of arguments */ inline void callProperty(ContextPtr ctx, Index index, Index nargs = 0) { @@ -424,9 +424,9 @@ /** * Wrapper for [duk_char_code_at](http://duktape.org/api.html#duk_char_code_at). * - * @param ctx the context - * @param index the index - * @param charOffset the offset + * \param ctx the context + * \param index the index + * \param charOffset the offset */ inline CodePoint charCodeAt(ContextPtr ctx, Index index, Size charOffset) { @@ -436,9 +436,9 @@ /** * Wrapper for [duk_check_stack](http://duktape.org/api.html#duk_check_stack). * - * @param ctx the context - * @param extra the extra space - * @return true if space is available + * \param ctx the context + * \param extra the extra space + * \return true if space is available */ inline bool checkStack(ContextPtr ctx, Index extra) { @@ -448,9 +448,9 @@ /** * Wrapper for [duk_check_stack_top](http://duktape.org/api.html#duk_check_stack_top). * - * @param ctx the context - * @param top the extra space - * @return true if space is available + * \param ctx the context + * \param top the extra space + * \return true if space is available */ inline bool checkStackTop(ContextPtr ctx, Index top) { @@ -460,10 +460,10 @@ /** * Wrapper for [duk_check_type](http://duktape.org/api.html#duk_check_type). * - * @param ctx the context - * @param index the value index - * @param type the desired type - * @return true if object is given type + * \param ctx the context + * \param index the value index + * \param type the desired type + * \return true if object is given type */ inline bool checkType(ContextPtr ctx, Index index, int type) { @@ -473,10 +473,10 @@ /** * Wrapper for [duk_check_type_mask](http://duktape.org/api.html#duk_check_type_mask). * - * @param ctx the context - * @param index the value index - * @param mask the desired mask - * @return true if object is one of the type + * \param ctx the context + * \param index the value index + * \param mask the desired mask + * \return true if object is one of the type */ inline bool checkTypeMask(ContextPtr ctx, Index index, unsigned mask) { @@ -486,8 +486,8 @@ /** * Wrapper for [duk_compact](http://duktape.org/api.html#duk_compact). * - * @param ctx the context - * @param objIndex the object index + * \param ctx the context + * \param objIndex the object index */ inline void compact(ContextPtr ctx, Index objIndex) { @@ -497,8 +497,8 @@ /** * Wrapper for [duk_concat](http://duktape.org/api.html#duk_concat). * - * @param ctx the context - * @param count the number of values + * \param ctx the context + * \param count the number of values */ inline void concat(ContextPtr ctx, Index count) { @@ -508,8 +508,8 @@ /** * Wrapper for [duk_copy](http://duktape.org/api.html#duk_copy). * - * @param from the from index - * @param to the destination + * \param from the from index + * \param to the destination */ inline void copy(ContextPtr ctx, Index from, Index to) { @@ -519,8 +519,8 @@ /** * Wrapper for [duk_def_prop](http://duktape.org/api.html#duk_def_prop). * - * @param index the object index - * @param flags the flags + * \param index the object index + * \param flags the flags */ inline void defineProperty(ContextPtr ctx, Index index, unsigned flags) { @@ -530,8 +530,8 @@ /** * Wrapper for [duk_del_prop](http://duktape.org/api.html#duk_del_prop). * - * @param index the object index - * @return true if deleted + * \param index the object index + * \return true if deleted */ inline bool deleteProperty(ContextPtr ctx, Index index) { @@ -541,9 +541,9 @@ /** * Wrapper for [duk_del_prop](http://duktape.org/api.html#duk_del_prop). * - * @param index the object index - * @param position the property index - * @return true if deleted + * \param index the object index + * \param position the property index + * \return true if deleted */ inline bool deleteProperty(ContextPtr ctx, Index index, unsigned position) { @@ -553,9 +553,9 @@ /** * Wrapper for [duk_del_prop](http://duktape.org/api.html#duk_del_prop). * - * @param index the object index - * @param name the property name - * @return true if deleted + * \param index the object index + * \param name the property name + * \return true if deleted */ inline bool deleteProperty(ContextPtr ctx, Index index, const std::string &name) { @@ -565,7 +565,7 @@ /** * Wrapper for [duk_dup](http://duktape.org/api.html#duk_dup). * - * @param index the value to copy + * \param index the value to copy */ inline void dup(ContextPtr ctx, int index = -1) { @@ -575,10 +575,10 @@ /** * Wrapper for [duk_equals](http://duktape.org/api.html#duk_equals). * - * @param ctx the context - * @param index1 the first value - * @param index2 the second value - * @return true if they equal + * \param ctx the context + * \param index1 the first value + * \param index2 the second value + * \return true if they equal */ inline bool equals(ContextPtr ctx, Index index1, Index index2) { @@ -588,7 +588,7 @@ /** * Wrapper for [duk_eval](http://duktape.org/api.html#duk_eval). * - * @param ctx the context + * \param ctx the context */ inline void eval(ContextPtr ctx) { @@ -598,9 +598,9 @@ /** * Wrapper for [duk_eval_file](http://duktape.org/api.html#duk_eval_file). * - * @param ctx the context - * @param path the path - * @param result true to get the result at the top of the stack + * \param ctx the context + * \param path the path + * \param result true to get the result at the top of the stack */ inline void evalFile(ContextPtr ctx, const std::string &path, bool result = true) { @@ -613,9 +613,9 @@ /** * Wrapper for [duk_eval_string](http://duktape.org/api.html#duk_eval_string). * - * @param ctx the context - * @param src the source script - * @param result true to get the result at the top of the stack + * \param ctx the context + * \param src the source script + * \param result true to get the result at the top of the stack */ inline void evalString(ContextPtr ctx, const std::string &src, bool result = true) { @@ -627,8 +627,8 @@ /** * Wrapper for [duk_gc](http://duktape.org/api.html#duk_gc). * - * @param ctx the context - * @param flags the flags + * \param ctx the context + * \param flags the flags */ inline void gc(ContextPtr ctx, unsigned flags = 0) { @@ -638,9 +638,9 @@ /** * Wrapper for [duk_has_prop](http://duktape.org/api.html#duk_has_prop). * - * @param ctx the context - * @param index the object index - * @return true if has + * \param ctx the context + * \param index the object index + * \return true if has */ inline bool hasProperty(ContextPtr ctx, Index index) { @@ -650,10 +650,10 @@ /** * Wrapper for [duk_has_prop](http://duktape.org/api.html#duk_has_prop). * - * @param ctx the context - * @param index the object index - * @param position the property index - * @return true if has + * \param ctx the context + * \param index the object index + * \param position the property index + * \return true if has */ inline bool hasProperty(ContextPtr ctx, Index index, unsigned position) { @@ -663,10 +663,10 @@ /** * Wrapper for [duk_has_prop](http://duktape.org/api.html#duk_has_prop). * - * @param ctx the context - * @param index the object index - * @param name the property name - * @return true if has + * \param ctx the context + * \param index the object index + * \param name the property name + * \return true if has */ inline bool hasProperty(ContextPtr ctx, int index, const std::string &name) { @@ -676,9 +676,9 @@ /** * Wrapper for [duk_insert](http://duktape.org/api.html#duk_insert). * - * @param ctx the context - * @param to the destination - * @note Wrapper of duk_insert + * \param ctx the context + * \param to the destination + * \note Wrapper of duk_insert */ inline void insert(ContextPtr ctx, Index to) { @@ -688,10 +688,10 @@ /** * Wrapper for [duk_instanceof](http://duktape.org/api.html#duk_instanceof). * - * @param ctx the context - * @param idx1 the value to test - * @param idx2 the instance requested - * @return true if idx1 is instance of idx2 + * \param ctx the context + * \param idx1 the value to test + * \param idx2 the instance requested + * \return true if idx1 is instance of idx2 */ inline bool instanceof(ContextPtr ctx, Index idx1, Index idx2) { @@ -701,8 +701,8 @@ /** * Wrapper for [duk_join](http://duktape.org/api.html#duk_join). * - * @param ctx the context - * @param count the number of values + * \param ctx the context + * \param count the number of values */ inline void join(ContextPtr ctx, Index count) { @@ -712,8 +712,8 @@ /** * Wrapper for [duk_json_decode](http://duktape.org/api.html#duk_json_decode). * - * @param ctx the context - * @param index the index + * \param ctx the context + * \param index the index */ inline void jsonDecode(ContextPtr ctx, Index index) { @@ -723,8 +723,8 @@ /** * Wrapper for [duk_json_encode](http://duktape.org/api.html#duk_json_encode). * - * @param ctx the context - * @param index the index + * \param ctx the context + * \param index the index */ inline void jsonEncode(ContextPtr ctx, Index index) { @@ -734,8 +734,8 @@ /** * Wrapper for [duk_normalize_index](http://duktape.org/api.html#duk_normalize_index). * - * @param ctx the context - * @param index the index + * \param ctx the context + * \param index the index */ inline Index normalizeIndex(ContextPtr ctx, Index index) { @@ -745,8 +745,8 @@ /** * Wrapper for [duk_pcall](http://duktape.org/api.html#duk_pcall). * - * @param ctx the context - * @param nargs the number of arguments + * \param ctx the context + * \param nargs the number of arguments */ inline int pcall(ContextPtr ctx, Index nargs = 0) { @@ -756,7 +756,7 @@ /** * Wrapper for [duk_peval](http://duktape.org/api.html#duk_peval). * - * @param ctx the context + * \param ctx the context */ inline int peval(ContextPtr ctx) { @@ -766,9 +766,9 @@ /** * Wrapper for [duk_peval_file](http://duktape.org/api.html#duk_peval_file). * - * @param ctx the context - * @param path the path - * @param result true to get the result at the top of the stack + * \param ctx the context + * \param path the path + * \param result true to get the result at the top of the stack */ inline int pevalFile(ContextPtr ctx, const std::string &path, bool result = true) { @@ -778,9 +778,9 @@ /** * Wrapper for [duk_peval_string](http://duktape.org/api.html#duk_peval_string). * - * @param ctx the context - * @param src the source script - * @param result true to get the result at the top of the stack + * \param ctx the context + * \param src the source script + * \param result true to get the result at the top of the stack */ inline int pevalString(ContextPtr ctx, const std::string &src, bool result = true) { @@ -790,8 +790,8 @@ /** * Wrapper for [duk_pop_n](http://duktape.org/api.html#duk_pop_n). * - * @param ctx the context - * @param count the number of values to pop + * \param ctx the context + * \param count the number of values to pop */ inline void pop(ContextPtr ctx, Index count = 1) { @@ -801,8 +801,8 @@ /** * Wrapper for [duk_remove](http://duktape.org/api.html#duk_remove). * - * @param ctx the context - * @param index the value to remove + * \param ctx the context + * \param index the value to remove */ inline void remove(ContextPtr ctx, Index index) { @@ -812,8 +812,8 @@ /** * Wrapper for [duk_replace](http://duktape.org/api.html#duk_replace). * - * @param ctx the context - * @param index the value to replace by the value at the top of the stack + * \param ctx the context + * \param index the value to replace by the value at the top of the stack */ inline void replace(ContextPtr ctx, Index index) { @@ -823,8 +823,8 @@ /** * Wrapper for [duk_set_prototype](http://duktape.org/api.html#duk_set_prototype). * - * @param ctx the context - * @param index the value index + * \param ctx the context + * \param index the value index */ inline void setPrototype(ContextPtr ctx, Index index) { @@ -834,9 +834,9 @@ /** * Wrapper for [duk_swap](http://duktape.org/api.html#duk_swap). * - * @param ctx the context - * @param index1 the first index - * @param index2 the second index + * \param ctx the context + * \param index1 the first index + * \param index2 the second index */ inline void swap(ContextPtr ctx, Index index1, Index index2) { @@ -846,8 +846,8 @@ /** * Wrapper for [duk_swap_top](http://duktape.org/api.html#duk_swap_top). * - * @param ctx the context - * @param index the index + * \param ctx the context + * \param index the index */ inline void swapTop(ContextPtr ctx, Index index) { @@ -857,8 +857,8 @@ /** * Wrapper for [duk_get_top](http://duktape.org/api.html#duk_get_top). * - * @param ctx the context - * @return the stack size + * \param ctx the context + * \return the stack size */ inline int top(ContextPtr ctx) noexcept { @@ -868,9 +868,9 @@ /** * Wrapper for [duk_get_type](http://duktape.org/api.html#duk_get_type). * - * @param ctx the context - * @param index the idnex - * @return the type + * \param ctx the context + * \param index the idnex + * \return the type */ inline int type(ContextPtr ctx, Index index) noexcept { @@ -888,7 +888,7 @@ /** * Push a value into the stack. Calls TypeTraits<T>::push(*this, value); * - * @param value the value to forward + * \param value the value to forward */ template <typename Type> inline void push(ContextPtr ctx, Type &&value) @@ -899,8 +899,8 @@ /** * Generic template function to get a value from the stack. * - * @param index the index - * @return the value + * \param index the index + * \return the value */ template <typename Type> inline auto get(ContextPtr ctx, int index) -> decltype(TypeTraits<Type>::get(ctx, 0)) @@ -911,8 +911,8 @@ /** * Require a type at the specified index. * - * @param index the index - * @return the value + * \param index the index + * \return the value */ template <typename Type> inline auto require(ContextPtr ctx, int index) -> decltype(TypeTraits<Type>::require(ctx, 0)) @@ -925,8 +925,8 @@ * * The TypeTraits<T> must have `static bool is(ContextPtr ptr, int index)`. * - * @param index the value index - * @return true if is the type + * \param index the value index + * \return true if is the type */ template <typename T> inline bool is(ContextPtr ctx, int index) @@ -940,9 +940,9 @@ * * The TypeTraits<T> must have `static T optional(Context &, int index, T &&defaultValue)`. * - * @param index the value index - * @param defaultValue the value replacement - * @return the value or defaultValue + * \param index the value index + * \param defaultValue the value replacement + * \return the value or defaultValue */ template <typename Type> inline auto optional(ContextPtr ctx, int index, Type &&defaultValue) @@ -960,10 +960,10 @@ /** * Get the property `name' as value from the object at the specified index. * - * @param index the object index - * @param name the property name - * @return the value - * @note The stack is unchanged + * \param index the object index + * \param name the property name + * \return the value + * \note The stack is unchanged */ template <typename Type, typename std::enable_if_t<!std::is_void<Type>::value> * = nullptr> inline auto getProperty(ContextPtr ctx, int index, const std::string &name) -> decltype(get<Type>(ctx, 0)) @@ -978,10 +978,10 @@ /** * Get a property by index, for arrays. * - * @param index the object index - * @param position the position int the object - * @return the value - * @note The stack is unchanged + * \param index the object index + * \param position the position int the object + * \return the value + * \note The stack is unchanged */ template <typename Type, typename std::enable_if_t<!std::is_void<Type>::value> * = nullptr> inline auto getProperty(ContextPtr ctx, int index, int position) -> decltype(get<Type>(ctx, 0)) @@ -996,9 +996,9 @@ /** * Get the property `name' and push it to the stack from the object at the specified index. * - * @param index the object index - * @param name the property name - * @note The stack contains the property value + * \param index the object index + * \param name the property name + * \note The stack contains the property value */ template <typename Type, typename std::enable_if_t<std::is_void<Type>::value> * = nullptr> inline void getProperty(ContextPtr ctx, int index, const std::string &name) @@ -1009,9 +1009,9 @@ /** * Get the property by index and push it to the stack from the object at the specified index. * - * @param index the object index - * @param position the position in the object - * @note The stack contains the property value + * \param index the object index + * \param position the position in the object + * \note The stack contains the property value */ template <typename Type, typename std::enable_if_t<std::is_void<Type>::value> * = nullptr> inline void getProperty(ContextPtr ctx, int index, int position) @@ -1022,11 +1022,11 @@ /** * Get an optional property `name` from the object at the specified index. * - * @param index the object index - * @param name the property name - * @param def the default value - * @return the value or def - * @note The stack is unchanged + * \param index the object index + * \param name the property name + * \param def the default value + * \return the value or def + * \note The stack is unchanged */ template <typename Type, typename DefaultValue> inline auto optionalProperty(ContextPtr ctx, int index, const std::string &name, DefaultValue &&def) -> decltype(optional(ctx, 0, std::forward<DefaultValue>(def))) @@ -1041,11 +1041,11 @@ /** * Get an optional property by index, for arrays * - * @param index the object index - * @param position the position int the object - * @param def the default value - * @return the value or def - * @note The stack is unchanged + * \param index the object index + * \param position the position int the object + * \param def the default value + * \return the value or def + * \note The stack is unchanged */ template <typename Type, typename DefaultValue> inline auto optionalProperty(ContextPtr ctx, int index, int position, DefaultValue &&def) -> decltype(optional(ctx, 0, std::forward<DefaultValue>(def))) @@ -1060,10 +1060,10 @@ /** * Set a property to the object at the specified index. * - * @param index the object index - * @param name the property name - * @param value the value to forward - * @note The stack is unchanged + * \param index the object index + * \param name the property name + * \param value the value to forward + * \note The stack is unchanged */ template <typename Type> void putProperty(ContextPtr ctx, int index, const std::string &name, Type &&value) @@ -1077,10 +1077,10 @@ /** * Set a property by index, for arrays. * - * @param index the object index - * @param position the position in the object - * @param value the value to forward - * @note The stack is unchanged + * \param index the object index + * \param position the position in the object + * \param value the value to forward + * \note The stack is unchanged */ template <typename Type> void putProperty(ContextPtr ctx, int index, int position, Type &&value) @@ -1094,8 +1094,8 @@ /** * Put the value that is at the top of the stack as property to the object. * - * @param index the object index - * @param name the property name + * \param index the object index + * \param name the property name */ inline void putProperty(ContextPtr ctx, int index, const std::string &name) { @@ -1105,8 +1105,8 @@ /** * Put the value that is at the top of the stack to the object as index. * - * @param index the object index - * @param position the position in the object + * \param index the object index + * \param position the position in the object */ inline void putProperty(ContextPtr ctx, int index, int position) { @@ -1116,8 +1116,8 @@ /** * Get a global value. * - * @param name the name of the global variable - * @return the value + * \param name the name of the global variable + * \return the value */ template <typename Type> inline auto getGlobal(ContextPtr ctx, const std::string &name, std::enable_if_t<!std::is_void<Type>::value> * = nullptr) -> decltype(get<Type>(ctx, 0)) @@ -1141,8 +1141,8 @@ /** * Set a global variable. * - * @param name the name of the global variable - * @param type the value to set + * \param name the name of the global variable + * \param type the value to set */ template <typename Type> inline void putGlobal(ContextPtr ctx, const std::string &name, Type&& type) @@ -1154,7 +1154,7 @@ /** * Put the value at the top of the stack as global property. * - * @param name the property name + * \param name the property name */ inline void putGlobal(ContextPtr ctx, const std::string &name) { @@ -1171,10 +1171,10 @@ /** * Enumerate an object or an array at the specified index. * - * @param index the object or array index - * @param flags the optional flags to pass to duk_enum - * @param getvalue set to true if you want to extract the value - * @param func the function to call for each properties + * \param index the object or array index + * \param flags the optional flags to pass to duk_enum + * \param getvalue set to true if you want to extract the value + * \param func the function to call for each properties */ template <typename Func> void enumerate(ContextPtr ctx, int index, duk_uint_t flags, duk_bool_t getvalue, Func &&func) @@ -1192,7 +1192,7 @@ /** * Return the this binding of the current function. * - * @return the this binding as the template given + * \return the this binding as the template given */ template <typename T> inline auto self(ContextPtr ctx) -> decltype(TypeTraits<T>::get(ctx, 0)) @@ -1207,7 +1207,7 @@ /** * Throw an ECMAScript exception. * - * @param ex the exception + * \param ex the exception */ template <typename Exception> void raise(ContextPtr ctx, const Exception &ex) @@ -1218,7 +1218,7 @@ /** * Wrapper for duk_throw. * - * @param ctx the context + * \param ctx the context */ inline void raise(ContextPtr ctx) { @@ -1228,10 +1228,10 @@ /** * Wrapper for duk_error. * - * @param ctx the context - * @param type the error type (e.g. DUK_ERR_REFERENCE_ERROR) - * @param fmt the format string - * @param args the arguments + * \param ctx the context + * \param type the error type (e.g. DUK_ERR_REFERENCE_ERROR) + * \param fmt the format string + * \param args the arguments */ template <typename... Args> inline void raise(ContextPtr ctx, int type, const char *fmt, Args&&... args) @@ -1242,8 +1242,8 @@ /** * Wrapper for duk_new. * - * @param ctx the context - * @param nargs the number of arguments + * \param ctx the context + * \param nargs the number of arguments */ inline void create(ContextPtr ctx, int nargs = 0) { @@ -1257,8 +1257,8 @@ * * - static void construct(Context &, T): must update this with the value and keep the stack unchanged * - * @param value the value to forward - * @see self + * \param value the value to forward + * \see self */ template <typename T> inline void construct(ContextPtr ctx, T &&value) @@ -1294,9 +1294,9 @@ /** * Check if the object at the given index is signed by T or raise TypeError if not. * - * @param ctx the context - * @param index the index - * @see sign + * \param ctx the context + * \param index the index + * \see sign */ template <typename T> inline void checkSignature(ContextPtr ctx, Index index) @@ -1310,8 +1310,8 @@ /** * Tells if the object at the specified index is of type T. * - * @param ctx the context - * @param index the index + * \param ctx the context + * \param index the index */ template <typename T> inline bool isSigned(ContextPtr ctx, Index index) @@ -1326,9 +1326,9 @@ * ------------------------------------------------------------------ */ /** - * @class Error - * @brief Base ECMAScript error class. - * @warning Override the function create for your own exceptions + * \class Error + * \brief Base ECMAScript error class. + * \warning Override the function create for your own exceptions */ class Error { private: @@ -1339,8 +1339,8 @@ /** * Constructor with a type of error specified, specially designed for derived errors. * - * @param type of error (e.g. DUK_ERR_ERROR) - * @param message the message + * \param type of error (e.g. DUK_ERR_ERROR) + * \param message the message */ inline Error(int type, std::string message) noexcept : m_type(type) @@ -1352,7 +1352,7 @@ /** * Constructor with a message. * - * @param message the message + * \param message the message */ inline Error(std::string message) noexcept : m_message(std::move(message)) @@ -1362,8 +1362,8 @@ /** * Create the exception on the stack. * - * @note the default implementation search for the global variables - * @param ctx the context + * \note the default implementation search for the global variables + * \param ctx the context */ virtual void raise(ContextPtr ctx) const noexcept { @@ -1372,15 +1372,15 @@ }; /** - * @class EvalError - * @brief Error in eval() function. + * \class EvalError + * \brief Error in eval() function. */ class EvalError : public Error { public: /** * Construct an EvalError. * - * @param message the message + * \param message the message */ inline EvalError(std::string message) noexcept : Error(DUK_ERR_EVAL_ERROR, std::move(message)) @@ -1389,15 +1389,15 @@ }; /** - * @class RangeError - * @brief Value is out of range. + * \class RangeError + * \brief Value is out of range. */ class RangeError : public Error { public: /** * Construct an RangeError. * - * @param message the message + * \param message the message */ inline RangeError(std::string message) noexcept : Error(DUK_ERR_RANGE_ERROR, std::move(message)) @@ -1406,15 +1406,15 @@ }; /** - * @class ReferenceError - * @brief Trying to use a variable that does not exist. + * \class ReferenceError + * \brief Trying to use a variable that does not exist. */ class ReferenceError : public Error { public: /** * Construct an ReferenceError. * - * @param message the message + * \param message the message */ inline ReferenceError(std::string message) noexcept : Error(DUK_ERR_REFERENCE_ERROR, std::move(message)) @@ -1423,15 +1423,15 @@ }; /** - * @class SyntaxError - * @brief Syntax error in the script. + * \class SyntaxError + * \brief Syntax error in the script. */ class SyntaxError : public Error { public: /** * Construct an SyntaxError. * - * @param message the message + * \param message the message */ inline SyntaxError(std::string message) noexcept : Error(DUK_ERR_SYNTAX_ERROR, std::move(message)) @@ -1440,15 +1440,15 @@ }; /** - * @class TypeError - * @brief Invalid type given. + * \class TypeError + * \brief Invalid type given. */ class TypeError : public Error { public: /** * Construct an TypeError. * - * @param message the message + * \param message the message */ inline TypeError(std::string message) noexcept : Error(DUK_ERR_TYPE_ERROR, std::move(message)) @@ -1457,15 +1457,15 @@ }; /** - * @class URIError - * @brief URI manipulation failure. + * \class URIError + * \brief URI manipulation failure. */ class URIError : public Error { public: /** * Construct an URIError. * - * @param message the message + * \param message the message */ inline URIError(std::string message) noexcept : Error(DUK_ERR_URI_ERROR, std::move(message)) @@ -1478,8 +1478,8 @@ * ------------------------------------------------------------------ */ /** - * @class TypeTraits<int> - * @brief Default implementation for int. + * \class TypeTraits<int> + * \brief Default implementation for int. * * Provides: get, is, optional, push, require. */ @@ -1489,9 +1489,9 @@ /** * Get an integer, return 0 if not an integer. * - * @param ctx the context - * @param index the index - * @return the integer + * \param ctx the context + * \param index the index + * \return the integer */ static inline int get(ContextPtr ctx, int index) { @@ -1501,9 +1501,9 @@ /** * Check if value is an integer. * - * @param ctx the context - * @param index the index - * @return true if integer + * \param ctx the context + * \param index the index + * \return true if integer */ static inline bool is(ContextPtr ctx, int index) { @@ -1513,10 +1513,10 @@ /** * Get an integer, return defaultValue if the value is not an integer. * - * @param ctx the context - * @param index the index - * @param defaultValue the defaultValue - * @return the integer or defaultValue + * \param ctx the context + * \param index the index + * \param defaultValue the defaultValue + * \return the integer or defaultValue */ static inline int optional(ContextPtr ctx, int index, int defaultValue) { @@ -1526,8 +1526,8 @@ /** * Push an integer. * - * @param ctx the context - * @param value the value + * \param ctx the context + * \param value the value */ static inline void push(ContextPtr ctx, int value) { @@ -1537,9 +1537,9 @@ /** * Require an integer, throws a JavaScript exception if not an integer. * - * @param ctx the context - * @param index the index - * @return the integer + * \param ctx the context + * \param index the index + * \return the integer */ static inline int require(ContextPtr ctx, int index) { @@ -1548,8 +1548,8 @@ }; /** - * @class TypeTraits<bool> - * @brief Default implementation for bool. + * \class TypeTraits<bool> + * \brief Default implementation for bool. * * Provides: get, is, optional, push, require. */ @@ -1559,9 +1559,9 @@ /** * Get a boolean, return 0 if not a boolean. * - * @param ctx the context - * @param index the index - * @return the boolean + * \param ctx the context + * \param index the index + * \return the boolean */ static inline bool get(ContextPtr ctx, int index) { @@ -1571,9 +1571,9 @@ /** * Check if value is a boolean. * - * @param ctx the context - * @param index the index - * @return true if boolean + * \param ctx the context + * \param index the index + * \return true if boolean */ static inline bool is(ContextPtr ctx, int index) { @@ -1583,10 +1583,10 @@ /** * Get a bool, return defaultValue if the value is not a boolean. * - * @param ctx the context - * @param index the index - * @param defaultValue the defaultValue - * @return the boolean or defaultValue + * \param ctx the context + * \param index the index + * \param defaultValue the defaultValue + * \return the boolean or defaultValue */ static inline bool optional(ContextPtr ctx, int index, bool defaultValue) { @@ -1596,8 +1596,8 @@ /** * Push a boolean. * - * @param ctx the context - * @param value the value + * \param ctx the context + * \param value the value */ static inline void push(ContextPtr ctx, bool value) { @@ -1607,9 +1607,9 @@ /** * Require a boolean, throws a JavaScript exception if not a boolean. * - * @param ctx the context - * @param index the index - * @return the boolean + * \param ctx the context + * \param index the index + * \return the boolean */ static inline bool require(ContextPtr ctx, int index) { @@ -1618,8 +1618,8 @@ }; /** - * @class TypeTraits<double> - * @brief Default implementation for double. + * \class TypeTraits<double> + * \brief Default implementation for double. * * Provides: get, is, optional, push, require. */ @@ -1629,9 +1629,9 @@ /** * Get a double, return 0 if not a double. * - * @param ctx the context - * @param index the index - * @return the double + * \param ctx the context + * \param index the index + * \return the double */ static inline double get(ContextPtr ctx, int index) { @@ -1641,9 +1641,9 @@ /** * Check if value is a double. * - * @param ctx the context - * @param index the index - * @return true if double + * \param ctx the context + * \param index the index + * \return true if double */ static inline bool is(ContextPtr ctx, int index) { @@ -1653,10 +1653,10 @@ /** * Get a double, return defaultValue if the value is not a double. * - * @param ctx the context - * @param index the index - * @param defaultValue the defaultValue - * @return the double or defaultValue + * \param ctx the context + * \param index the index + * \param defaultValue the defaultValue + * \return the double or defaultValue */ static inline double optional(ContextPtr ctx, int index, double defaultValue) { @@ -1666,8 +1666,8 @@ /** * Push a double. * - * @param ctx the context - * @param value the value + * \param ctx the context + * \param value the value */ static inline void push(ContextPtr ctx, double value) { @@ -1677,9 +1677,9 @@ /** * Require a double, throws a JavaScript exception if not a double. * - * @param ctx the context - * @param index the index - * @return the double + * \param ctx the context + * \param index the index + * \return the double */ static inline double require(ContextPtr ctx, int index) { @@ -1688,8 +1688,8 @@ }; /** - * @class TypeTraits<std::string> - * @brief Default implementation for std::string. + * \class TypeTraits<std::string> + * \brief Default implementation for std::string. * * Provides: get, is, optional, push, require. * @@ -1701,9 +1701,9 @@ /** * Get a string, return 0 if not a string. * - * @param ctx the context - * @param index the index - * @return the string + * \param ctx the context + * \param index the index + * \return the string */ static inline std::string get(ContextPtr ctx, int index) { @@ -1716,9 +1716,9 @@ /** * Check if value is a string. * - * @param ctx the context - * @param index the index - * @return true if string + * \param ctx the context + * \param index the index + * \return true if string */ static inline bool is(ContextPtr ctx, int index) { @@ -1728,10 +1728,10 @@ /** * Get a string, return defaultValue if the value is not an string. * - * @param ctx the context - * @param index the index - * @param defaultValue the defaultValue - * @return the string or defaultValue + * \param ctx the context + * \param index the index + * \param defaultValue the defaultValue + * \return the string or defaultValue */ static inline std::string optional(ContextPtr ctx, int index, std::string defaultValue) { @@ -1741,8 +1741,8 @@ /** * Push a string. * - * @param ctx the context - * @param value the value + * \param ctx the context + * \param value the value */ static inline void push(ContextPtr ctx, const std::string &value) { @@ -1752,9 +1752,9 @@ /** * Require a string, throws a JavaScript exception if not a string. * - * @param ctx the context - * @param index the index - * @return the string + * \param ctx the context + * \param index the index + * \return the string */ static inline std::string require(ContextPtr ctx, int index) { @@ -1766,8 +1766,8 @@ }; /** - * @class TypeTraits<const char *> - * @brief Default implementation for const char literals. + * \class TypeTraits<const char *> + * \brief Default implementation for const char literals. * * Provides: get, is, optional, push, require. */ @@ -1777,9 +1777,9 @@ /** * Get a string, return 0 if not a string. * - * @param ctx the context - * @param index the index - * @return the string + * \param ctx the context + * \param index the index + * \return the string */ static inline const char *get(ContextPtr ctx, int index) { @@ -1789,9 +1789,9 @@ /** * Check if value is a string. * - * @param ctx the context - * @param index the index - * @return true if string + * \param ctx the context + * \param index the index + * \return true if string */ static inline bool is(ContextPtr ctx, int index) { @@ -1801,10 +1801,10 @@ /** * Get an integer, return defaultValue if the value is not an integer. * - * @param ctx the context - * @param index the index - * @param defaultValue the defaultValue - * @return the integer or defaultValue + * \param ctx the context + * \param index the index + * \param defaultValue the defaultValue + * \return the integer or defaultValue */ static inline const char *optional(ContextPtr ctx, int index, const char *defaultValue) { @@ -1814,8 +1814,8 @@ /** * Push a string. * - * @param ctx the context - * @param value the value + * \param ctx the context + * \param value the value */ static inline void push(ContextPtr ctx, const char *value) { @@ -1825,9 +1825,9 @@ /** * Require a string, throws a JavaScript exception if not a string. * - * @param ctx the context - * @param index the index - * @return the string + * \param ctx the context + * \param index the index + * \return the string */ static inline const char *require(ContextPtr ctx, int index) { @@ -1836,7 +1836,7 @@ }; /** - * @brief Implementation for non-managed pointers. + * \brief Implementation for non-managed pointers. * * Provides: get, is, optional, push, require. */ @@ -1846,9 +1846,9 @@ /** * Get a pointer, return nullptr if not a pointer. * - * @param ctx the context - * @param index the index - * @return the pointer + * \param ctx the context + * \param index the index + * \return the pointer */ static inline T *get(ContextPtr ctx, int index) { @@ -1858,9 +1858,9 @@ /** * Check if value is a pointer. * - * @param ctx the context - * @param index the index - * @return true if pointer + * \param ctx the context + * \param index the index + * \return true if pointer */ static inline bool is(ContextPtr ctx, int index) { @@ -1870,10 +1870,10 @@ /** * Get a pointer, return defaultValue if the value is not a pointer. * - * @param ctx the context - * @param index the index - * @param defaultValue the defaultValue - * @return the pointer or defaultValue + * \param ctx the context + * \param index the index + * \param defaultValue the defaultValue + * \return the pointer or defaultValue */ static inline T *optional(ContextPtr ctx, int index, RawPointer<T> defaultValue) { @@ -1883,8 +1883,8 @@ /** * Push a pointer. * - * @param ctx the context - * @param value the value + * \param ctx the context + * \param value the value */ static inline void push(ContextPtr ctx, const RawPointer<T> &value) { @@ -1894,9 +1894,9 @@ /** * Require a pointer, throws a JavaScript exception if not a pointer. * - * @param ctx the context - * @param index the index - * @return the pointer + * \param ctx the context + * \param index the index + * \return the pointer */ static inline T *require(ContextPtr ctx, int index) { @@ -1905,8 +1905,8 @@ }; /** - * @class TypeTraits<Function> - * @brief Push C++ function to the stack. + * \class TypeTraits<Function> + * \brief Push C++ function to the stack. * * Provides: push. * @@ -1918,9 +1918,9 @@ /** * Check if the value at the given index is callable. * - * @param ctx the context - * @param index the value index - * @return true if the value is callable + * \param ctx the context + * \param index the value index + * \return true if the value is callable */ static bool is(ContextPtr ctx, Index index) { @@ -1931,8 +1931,8 @@ * Push the C++ function, it is wrapped as Duktape/C function and allocated on the heap by moving the * std::function. * - * @param ctx the context - * @param fn the function + * \param ctx the context + * \param fn the function */ static void push(ContextPtr ctx, Function fn) { @@ -1941,8 +1941,8 @@ }; /** - * @class TypeTraits<FunctionMap> - * @brief Put the functions to the object at the top of the stack. + * \class TypeTraits<FunctionMap> + * \brief Put the functions to the object at the top of the stack. * * Provides: push. */ @@ -1952,8 +1952,8 @@ /** * Push all functions to the object at the top of the stack. * - * @param ctx the context - * @param map the map of function + * \param ctx the context + * \param map the map of function */ static inline void push(ContextPtr ctx, const FunctionMap &map) { @@ -1967,8 +1967,8 @@ }; /** - * @class TypeTraits<Object> - * @brief Push empty object to the stack. + * \class TypeTraits<Object> + * \brief Push empty object to the stack. * * Provides: is, push. */ @@ -1978,9 +1978,9 @@ /** * Check if value is an object. * - * @param ctx the context - * @param index the index - * @return true if object + * \param ctx the context + * \param index the index + * \return true if object */ static inline bool is(ContextPtr ctx, int index) { @@ -1990,7 +1990,7 @@ /** * Create an empty object on the stack. * - * @param ctx the context + * \param ctx the context */ static inline void push(ContextPtr ctx, const Object &) { @@ -1999,8 +1999,8 @@ }; /** - * @class TypeTraits<Array> - * @brief Push empty array to the stack. + * \class TypeTraits<Array> + * \brief Push empty array to the stack. * * Provides: is, push. */ @@ -2010,9 +2010,9 @@ /** * Check if value is a array. * - * @param ctx the context - * @param index the index - * @return true if array + * \param ctx the context + * \param index the index + * \return true if array */ static inline bool is(ContextPtr ctx, int index) { @@ -2022,7 +2022,7 @@ /** * Create an empty array on the stack. * - * @param ctx the context + * \param ctx the context */ static inline void push(ContextPtr ctx, const Array &) { @@ -2031,8 +2031,8 @@ }; /** - * @class TypeTraits<Undefined> - * @brief Push undefined value to the stack. + * \class TypeTraits<Undefined> + * \brief Push undefined value to the stack. * * Provides: is, push. */ @@ -2042,9 +2042,9 @@ /** * Check if value is undefined. * - * @param ctx the context - * @param index the index - * @return true if undefined + * \param ctx the context + * \param index the index + * \return true if undefined */ static inline bool is(ContextPtr ctx, int index) { @@ -2054,7 +2054,7 @@ /** * Push undefined value on the stack. * - * @param ctx the context + * \param ctx the context */ static inline void push(ContextPtr ctx, const Undefined &) { @@ -2063,8 +2063,8 @@ }; /** - * @class TypeTraits<Null> - * @brief Push null value to the stack. + * \class TypeTraits<Null> + * \brief Push null value to the stack. * * Provides: is, push. */ @@ -2074,9 +2074,9 @@ /** * Check if value is null. * - * @param ctx the context - * @param index the index - * @return true if null + * \param ctx the context + * \param index the index + * \return true if null */ static inline bool is(ContextPtr ctx, int index) { @@ -2086,7 +2086,7 @@ /** * Push null value on the stack. * - * @param ctx the context + * \param ctx the context */ static inline void push(ContextPtr ctx, const Null &) { @@ -2095,7 +2095,7 @@ }; /** - * @brief Push this binding into the stack. + * \brief Push this binding into the stack. * * Provides: push. */ @@ -2105,7 +2105,7 @@ /** * Push this function into the stack. * - * @param ctx the context + * \param ctx the context */ static inline void push(ContextPtr ctx, const This &) { @@ -2114,8 +2114,8 @@ }; /** - * @class TypeTraits<Global> - * @brief Push the global object to the stack. + * \class TypeTraits<Global> + * \brief Push the global object to the stack. * * Provides: push. */ @@ -2125,7 +2125,7 @@ /** * Push the global object into the stack. * - * @param ctx the context + * \param ctx the context */ static inline void push(ContextPtr ctx, const Global &) { @@ -2134,7 +2134,7 @@ }; /** - * @brief Push a map of key-value pair as objects. + * \brief Push a map of key-value pair as objects. * * Provides: push. * @@ -2146,9 +2146,9 @@ /** * Put all values from the map as properties to the object at the top of the stack. * - * @param ctx the context - * @param map the values - * @note You need an object at the top of the stack before calling this function + * \param ctx the context + * \param map the values + * \note You need an object at the top of the stack before calling this function */ static void push(ContextPtr ctx, const std::unordered_map<std::string, T> &map) { @@ -2162,7 +2162,7 @@ }; /** - * @brief Push or get vectors as JavaScript arrays. + * \brief Push or get vectors as JavaScript arrays. * * Provides: get, push. */ @@ -2172,9 +2172,9 @@ /** * Get an array from the stack. * - * @param ctx the context - * @param index the array index - * @return the array or empty array if the value is not an array + * \param ctx the context + * \param index the array index + * \return the array or empty array if the value is not an array */ static std::vector<T> get(ContextPtr ctx, int index) { @@ -2196,8 +2196,8 @@ /** * Create an array with the specified values. * - * @param ctx the context - * @param array the values + * \param ctx the context + * \param array the values */ static void push(ContextPtr ctx, const std::vector<T> &array) { @@ -2214,8 +2214,8 @@ }; /** - * @brief Implementation of managed shared_ptr - * @see Shared + * \brief Implementation of managed shared_ptr + * \see Shared */ template <typename T> class TypeTraits<Shared<T>> { @@ -2244,8 +2244,8 @@ /** * Construct the shared_ptr as this. * - * @param ctx the context - * @param value the value + * \param ctx the context + * \param value the value */ static void construct(ContextPtr ctx, Shared<T> value) { @@ -2259,8 +2259,8 @@ /** * Push a managed shared_ptr as object. * - * @param ctx the context - * @param value the value + * \param ctx the context + * \param value the value */ static void push(ContextPtr ctx, Shared<T> value) { @@ -2275,9 +2275,9 @@ /** * Get a managed shared_ptr from the stack. * - * @param ctx the context - * @param index the object index - * @return the shared_ptr + * \param ctx the context + * \param index the object index + * \return the shared_ptr */ static std::shared_ptr<T> get(ContextPtr ctx, int index) { @@ -2294,8 +2294,8 @@ }; /** - * @brief Implementation of managed pointers - * @see Pointer + * \brief Implementation of managed pointers + * \see Pointer */ template <typename T> class TypeTraits<Pointer<T>> { @@ -2324,8 +2324,8 @@ /** * Construct the pointer as this. * - * @param ctx the context - * @param value the value + * \param ctx the context + * \param value the value */ static void construct(ContextPtr ctx, Pointer<T> value) { @@ -2339,8 +2339,8 @@ /** * Push a managed pointer as object. * - * @param ctx the context - * @param value the value + * \param ctx the context + * \param value the value */ static void push(ContextPtr ctx, Pointer<T> value) { @@ -2355,10 +2355,10 @@ /** * Get a managed pointer from the stack. * - * @param ctx the context - * @param index the object index - * @return the pointer - * @warning Do not store the pointer into the C++ side, the object can be deleted at any time + * \param ctx the context + * \param index the object index + * \return the pointer + * \warning Do not store the pointer into the C++ side, the object can be deleted at any time */ static T *get(ContextPtr ctx, int index) {
--- a/lib/irccd/json.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/json.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_JSON_HPP /** - * @file json.hpp - * @brief Jansson C++14 wrapper + * \file json.hpp + * \brief Jansson C++14 wrapper * * These classes can be used to build or parse JSON documents using jansson library. It is designed to be safe * and explicit. It does not implement implicit sharing like jansson so when you access (e.g. Value::toObject) values @@ -44,8 +44,8 @@ namespace json { /** - * @enum Type - * @brief Type of Value. + * \enum Type + * \brief Type of Value. */ enum class Type { Array, //!< Value is an array [] @@ -58,8 +58,8 @@ }; /** - * @class Error - * @brief Error description. + * \class Error + * \brief Error description. */ class Error : public std::exception { private: @@ -73,11 +73,11 @@ /** * Create the error. * - * @param text the text message - * @param source the source (e.g. file name) - * @param line the line number - * @param column the column number - * @param position the position + * \param text the text message + * \param source the source (e.g. file name) + * \param line the line number + * \param column the column number + * \param position the position */ inline Error(std::string text, std::string source, int line, int column, int position) noexcept : m_text(std::move(text)) @@ -91,7 +91,7 @@ /** * Get the error message. * - * @return the text + * \return the text */ inline const std::string &text() const noexcept { @@ -101,7 +101,7 @@ /** * Get the source (e.g. a file name). * - * @return the source + * \return the source */ inline const std::string &source() const noexcept { @@ -111,7 +111,7 @@ /** * Get the line. * - * @return the line + * \return the line */ inline int line() const noexcept { @@ -121,7 +121,7 @@ /** * Get the column. * - * @return the column + * \return the column */ inline int column() const noexcept { @@ -131,7 +131,7 @@ /** * Get the position. * - * @return the position + * \return the position */ inline int position() const noexcept { @@ -141,7 +141,7 @@ /** * Get the error message. * - * @return the message + * \return the message */ const char *what() const noexcept override { @@ -150,8 +150,8 @@ }; /** - * @class Buffer - * @brief Open JSON document from text. + * \class Buffer + * \brief Open JSON document from text. */ class Buffer { public: @@ -159,8 +159,8 @@ }; /** - * @class File - * @brief Open JSON document from a file. + * \class File + * \brief Open JSON document from a file. */ class File { public: @@ -168,8 +168,8 @@ }; /** - * @class Value - * @brief Generic JSON value wrapper. + * \class Value + * \brief Generic JSON value wrapper. */ class Value { private: @@ -189,8 +189,8 @@ std::string toJson(int indent, int current) const; /** - * @class BaseIterator - * @brief This is the base class for iterator and const_iterator + * \class BaseIterator + * \brief This is the base class for iterator and const_iterator * * This iterator works for both arrays and objects. Because of that purpose, it is only available * as forward iterator. @@ -230,9 +230,9 @@ /** * Get the iterator key (for objects). * - * @pre iterator must be dereferenceable - * @pre iterator must come from object - * @return the key + * \pre iterator must be dereferenceable + * \pre iterator must come from object + * \return the key */ inline const std::string &key() const noexcept { @@ -245,9 +245,9 @@ /** * Get the iterator position (for arrays). * - * @pre iterator must be dereferenceable - * @pre iterator must come from arrays - * @return the index + * \pre iterator must be dereferenceable + * \pre iterator must come from arrays + * \return the index */ inline unsigned index() const noexcept { @@ -260,8 +260,8 @@ /** * Dereference the iterator. * - * @pre iterator be dereferenceable - * @return the value + * \pre iterator be dereferenceable + * \return the value */ inline ValueType &operator*() noexcept { @@ -274,8 +274,8 @@ /** * Dereference the iterator as a pointer. * - * @pre iterator must be dereferenceable - * @return the value + * \pre iterator must be dereferenceable + * \return the value */ inline ValueType *operator->() noexcept { @@ -288,8 +288,8 @@ /** * Increment the iterator. (Prefix version). * - * @pre iterator must be dereferenceable - * @return *this; + * \pre iterator must be dereferenceable + * \return *this; */ inline BaseIterator &operator++() noexcept { @@ -304,8 +304,8 @@ /** * Increment the iterator. (Postfix version). * - * @pre iterator must be dereferenceable - * @return *this; + * \pre iterator must be dereferenceable + * \return *this; */ inline BaseIterator &operator++(int) noexcept { @@ -320,9 +320,9 @@ /** * Compare two iterators. * - * @param it1 the first iterator - * @param it2 the second iterator - * @return true if they are same + * \param it1 the first iterator + * \param it2 the second iterator + * \return true if they are same */ bool operator==(const BaseIterator &it) const noexcept { @@ -337,8 +337,8 @@ /** * Test if the iterator is different. * - * @param it the iterator - * @return true if they are different + * \param it the iterator + * \return true if they are different */ inline bool operator!=(const BaseIterator &it) const noexcept { @@ -370,7 +370,7 @@ * * For any other types, initialize with sane default value. * - * @param type the type + * \param type the type */ Value(Type type); @@ -385,7 +385,7 @@ /** * Construct a boolean value. * - * @param value the boolean value + * \param value the boolean value */ inline Value(bool value) noexcept : m_type(Type::Boolean) @@ -396,7 +396,7 @@ /** * Create value from integer. * - * @param value the value + * \param value the value */ inline Value(int value) noexcept : m_type(Type::Int) @@ -407,7 +407,7 @@ /** * Construct a value from a C-string. * - * @param value the C-string + * \param value the C-string */ inline Value(const char *value) : m_type(Type::String) @@ -418,7 +418,7 @@ /** * Construct a number value. * - * @param value the real value + * \param value the real value */ inline Value(double value) noexcept : m_type(Type::Real) @@ -429,7 +429,7 @@ /** * Construct a string value. * - * @param value the string + * \param value the string */ inline Value(std::string value) noexcept : m_type(Type::String) @@ -440,8 +440,8 @@ /** * Create an object from a map. * - * @param values the values - * @see fromObject + * \param values the values + * \see fromObject */ inline Value(std::map<std::string, Value> values) : Value(Type::Object) @@ -453,8 +453,8 @@ /** * Create an array from a vector. * - * @param values the values - * @see fromArray + * \param values the values + * \see fromArray */ inline Value(std::vector<Value> values) : Value(Type::Array) @@ -466,23 +466,23 @@ /** * Construct a value from a buffer. * - * @param buffer the text - * @throw Error on errors + * \param buffer the text + * \throw Error on errors */ Value(const Buffer &buffer); /** * Construct a value from a file. * - * @param file the file - * @throw Error on errors + * \param file the file + * \throw Error on errors */ Value(const File &file); /** * Move constructor. * - * @param other the value to move from + * \param other the value to move from */ inline Value(Value &&other) { @@ -492,7 +492,7 @@ /** * Copy constructor. * - * @param other the value to copy from + * \param other the value to copy from */ inline Value(const Value &other) { @@ -502,8 +502,8 @@ /** * Copy operator. * - * @param other the value to copy from - * @return *this + * \param other the value to copy from + * \return *this */ inline Value &operator=(const Value &other) { @@ -515,7 +515,7 @@ /** * Move operator. * - * @param other the value to move from + * \param other the value to move from */ inline Value &operator=(Value &&other) { @@ -532,8 +532,8 @@ /** * Get an iterator to the beginning. * - * @pre must be an array or object - * @return the iterator + * \pre must be an array or object + * \return the iterator */ inline iterator begin() noexcept { @@ -545,8 +545,8 @@ /** * Overloaded function. * - * @pre must be an array or object - * @return the iterator + * \pre must be an array or object + * \return the iterator */ inline const_iterator begin() const noexcept { @@ -558,8 +558,8 @@ /** * Overloaded function. * - * @pre must be an array or object - * @return the iterator + * \pre must be an array or object + * \return the iterator */ inline const_iterator cbegin() const noexcept { @@ -571,8 +571,8 @@ /** * Get an iterator to the end. * - * @pre must be an array or object - * @return the iterator + * \pre must be an array or object + * \return the iterator */ inline iterator end() noexcept { @@ -584,8 +584,8 @@ /** * Get an iterator to the end. * - * @pre must be an array or object - * @return the iterator + * \pre must be an array or object + * \return the iterator */ inline const_iterator end() const noexcept { @@ -597,8 +597,8 @@ /** * Get an iterator to the end. * - * @pre must be an array or object - * @return the iterator + * \pre must be an array or object + * \return the iterator */ inline const_iterator cend() const noexcept { @@ -610,7 +610,7 @@ /** * Get the value type. * - * @return the type + * \return the type */ inline Type typeOf() const noexcept { @@ -620,36 +620,36 @@ /** * Get the value as boolean. * - * @return the value or false if not a boolean + * \return the value or false if not a boolean */ bool toBool() const noexcept; /** * Get the value as integer. * - * @return the value or 0 if not a integer + * \return the value or 0 if not a integer */ int toInt() const noexcept; /** * Get the value as real. * - * @return the value or 0 if not a real + * \return the value or 0 if not a real */ double toReal() const noexcept; /** * Get the value as string. * - * @param coerce set to true to coerce the value if not a string - * @return the value or empty string if not a string + * \param coerce set to true to coerce the value if not a string + * \return the value or empty string if not a string */ std::string toString(bool coerce = false) const noexcept; /** * Check if the value is boolean type. * - * @return true if boolean + * \return true if boolean */ inline bool isBool() const noexcept { @@ -659,7 +659,7 @@ /** * Check if the value is integer type. * - * @return true if integer + * \return true if integer */ inline bool isInt() const noexcept { @@ -669,7 +669,7 @@ /** * Check if the value is object type. * - * @return true if object + * \return true if object */ inline bool isObject() const noexcept { @@ -679,7 +679,7 @@ /** * Check if the value is array type. * - * @return true if array + * \return true if array */ inline bool isArray() const noexcept { @@ -689,9 +689,9 @@ /** * Check if the value is integer or real type. * - * @return true if integer or real - * @see toInt - * @see toReal + * \return true if integer or real + * \see toInt + * \see toReal */ inline bool isNumber() const noexcept { @@ -701,7 +701,7 @@ /** * Check if the value is real type. * - * @return true if real + * \return true if real */ inline bool isReal() const noexcept { @@ -711,7 +711,7 @@ /** * Check if the value is null type. * - * @return true if null + * \return true if null */ inline bool isNull() const noexcept { @@ -721,7 +721,7 @@ /** * Check if the value is string type. * - * @return true if string + * \return true if string */ inline bool isString() const noexcept { @@ -731,8 +731,8 @@ /** * Get the array or object size. * - * @pre must be an array or object - * @return the size + * \pre must be an array or object + * \return the size */ inline unsigned size() const noexcept { @@ -747,7 +747,7 @@ /** * Remove all the values. * - * @pre must be an array or an object + * \pre must be an array or an object */ inline void clear() noexcept { @@ -767,9 +767,9 @@ /** * Get the value at the specified position or the defaultValue if position is out of bounds. * - * @param position the position - * @param defaultValue the value replacement - * @return the value or defaultValue + * \param position the position + * \param defaultValue the value replacement + * \return the value or defaultValue */ template <typename DefaultValue> inline Value valueOr(unsigned position, DefaultValue &&defaultValue) const @@ -783,10 +783,10 @@ /** * Overloaded function with type check. * - * @param position the position - * @param type the requested type - * @param defaultValue the value replacement - * @return the value or defaultValue + * \param position the position + * \param type the requested type + * \param defaultValue the value replacement + * \return the value or defaultValue */ template <typename DefaultValue> inline Value valueOr(unsigned position, Type type, DefaultValue &&defaultValue) const @@ -800,10 +800,10 @@ /** * Get a value at the specified index. * - * @pre must be an array - * @param position the position - * @return the value - * @throw std::out_of_range if out of bounds + * \pre must be an array + * \param position the position + * \return the value + * \throw std::out_of_range if out of bounds */ inline const Value &at(unsigned position) const { @@ -815,10 +815,10 @@ /** * Overloaded function. * - * @pre must be an array - * @param position the position - * @return the value - * @throw std::out_of_range if out of bounds + * \pre must be an array + * \param position the position + * \return the value + * \throw std::out_of_range if out of bounds */ inline Value &at(unsigned position) { @@ -830,10 +830,10 @@ /** * Get a value at the specified index. * - * @pre must be an array - * @pre position must be valid - * @param position the position - * @return the value + * \pre must be an array + * \pre position must be valid + * \param position the position + * \return the value */ inline const Value &operator[](unsigned position) const { @@ -846,10 +846,10 @@ /** * Overloaded function. * - * @pre must be an array - * @pre position must be valid - * @param position the position - * @return the value + * \pre must be an array + * \pre position must be valid + * \param position the position + * \return the value */ inline Value &operator[](unsigned position) { @@ -862,8 +862,8 @@ /** * Push a value to the beginning of the array. * - * @pre must be an array - * @param value the value to push + * \pre must be an array + * \param value the value to push */ inline void push(const Value &value) { @@ -875,8 +875,8 @@ /** * Overloaded function. * - * @pre must be an array - * @param value the value to push + * \pre must be an array + * \param value the value to push */ inline void push(Value &&value) { @@ -888,10 +888,10 @@ /** * Insert a value at the specified position. * - * @pre must be an array - * @pre position must be valid - * @param position the position - * @param value the value to push + * \pre must be an array + * \pre position must be valid + * \param position the position + * \param value the value to push */ inline void insert(unsigned position, const Value &value) { @@ -904,10 +904,10 @@ /** * Overloaded function. * - * @pre must be an array - * @pre position must be valid - * @param position the position - * @param value the value to push + * \pre must be an array + * \pre position must be valid + * \param position the position + * \param value the value to push */ inline void insert(unsigned position, Value &&value) { @@ -920,8 +920,8 @@ /** * Add a new value to the end. * - * @pre must be an array - * @param value the value to append + * \pre must be an array + * \param value the value to append */ inline void append(const Value &value) { @@ -933,8 +933,8 @@ /** * Overloaded function. * - * @pre must be an array - * @param value the value to append + * \pre must be an array + * \param value the value to append */ inline void append(Value &&value) { @@ -946,9 +946,9 @@ /** * Remove a value at the specified position. * - * @pre must be an array - * @pre position must be valid - * @param position the position + * \pre must be an array + * \pre position must be valid + * \param position the position */ inline void erase(unsigned position) { @@ -966,9 +966,9 @@ /** * Get the value at the specified key or the defaultValue if key is absent. * - * @param name the name - * @param defaultValue the value replacement - * @return the value or defaultValue + * \param name the name + * \param defaultValue the value replacement + * \return the value or defaultValue */ template <typename DefaultValue> Value valueOr(const std::string &name, DefaultValue &&defaultValue) const @@ -987,10 +987,10 @@ /** * Overloaded function with type check. * - * @param name the name - * @param type the requested type - * @param defaultValue the value replacement - * @return the value or defaultValue + * \param name the name + * \param type the requested type + * \param defaultValue the value replacement + * \return the value or defaultValue */ template <typename DefaultValue> Value valueOr(const std::string &name, Type type, DefaultValue &&defaultValue) const @@ -1009,10 +1009,10 @@ /** * Get a value from the object. * - * @pre must be an object - * @param name the value key - * @return the value - * @throw std::out_of_range if not found + * \pre must be an object + * \param name the value key + * \return the value + * \throw std::out_of_range if not found */ inline const Value &at(const std::string &name) const { @@ -1024,10 +1024,10 @@ /** * Overloaded function. * - * @pre must be an object - * @param name the value key - * @return the value - * @throw std::out_of_range if not found + * \pre must be an object + * \param name the value key + * \return the value + * \throw std::out_of_range if not found */ inline Value &at(const std::string &name) { @@ -1039,9 +1039,9 @@ /** * Get a value from the object. * - * @pre must be an object - * @param name the value key - * @return the value + * \pre must be an object + * \param name the value key + * \return the value */ inline Value &operator[](const std::string &name) { @@ -1053,9 +1053,9 @@ /** * Find a value by key. * - * @pre must be an object - * @param key the property key - * @return the iterator or past the end if not found + * \pre must be an object + * \param key the property key + * \return the iterator or past the end if not found */ inline iterator find(const std::string &key) { @@ -1067,9 +1067,9 @@ /** * Overloaded function. * - * @pre must be an object - * @param key the property key - * @return the iterator or past the end if not found + * \pre must be an object + * \param key the property key + * \return the iterator or past the end if not found */ inline const_iterator find(const std::string &key) const { @@ -1081,9 +1081,9 @@ /** * Insert a new value. * - * @pre must be an object - * @param name the key - * @param value the value + * \pre must be an object + * \param name the key + * \param value the value */ inline void insert(std::string name, const Value &value) { @@ -1095,9 +1095,9 @@ /** * Overloaded function. * - * @pre must be an object - * @param name the key - * @param value the value + * \pre must be an object + * \param name the key + * \param value the value */ inline void insert(std::string name, Value &&value) { @@ -1109,9 +1109,9 @@ /** * Check if a value exists. * - * @pre must be an object - * @param key the key value - * @return true if exists + * \pre must be an object + * \param key the key value + * \return true if exists */ inline bool contains(const std::string &key) const noexcept { @@ -1123,8 +1123,8 @@ /** * Remove a value of the specified key. * - * @pre must be an object - * @param key the value key + * \pre must be an object + * \param key the value key */ inline void erase(const std::string &key) { @@ -1136,9 +1136,9 @@ /** * Return this value as JSon representation. * - * @param indent, the indentation to use (0 == compact, < 0 == tabs, > 0 == number of spaces) - * @param tabs, use tabs or not - * @return the string + * \param indent, the indentation to use (0 == compact, < 0 == tabs, > 0 == number of spaces) + * \param tabs, use tabs or not + * \return the string */ inline std::string toJson(int indent = 2) const { @@ -1149,16 +1149,16 @@ /** * Escape the input. * - * @param input the input - * @return the escaped string + * \param input the input + * \return the escaped string */ std::string escape(const std::string &input); /** * Convenient function for creating array from initializer list. * - * @param values the values - * @return the array + * \param values the values + * \return the array */ inline Value array(std::initializer_list<Value> values) { @@ -1168,8 +1168,8 @@ /** * Convenient function for creating object from initializer list. * - * @param values the values - * @return the object + * \param values the values + * \return the object */ inline Value object(std::initializer_list<std::pair<std::string, Value>> values) {
--- a/lib/irccd/logger.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/logger.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_LOGGER_HPP /** - * @file logger.hpp - * @brief Logging facilities. + * \file logger.hpp + * \brief Logging facilities. */ #include <irccd/sysconfig.hpp> @@ -35,8 +35,8 @@ namespace log { /** - * @enum Level - * @brief Which level of warning + * \enum Level + * \brief Which level of warning */ enum class Level { Info, //!< Standard information (disabled if verbose is false) @@ -49,16 +49,16 @@ * -------------------------------------------------------- */ /** - * @class Interface - * @brief Interface to implement new logger mechanisms + * \class Interface + * \brief Interface to implement new logger mechanisms * * Derive from this class and use Logger::setInterface() to change logging * system. * - * @see File - * @see Console - * @see Syslog - * @see Silent + * \see File + * \see Console + * \see Syslog + * \see Silent */ class Interface { public: @@ -66,8 +66,8 @@ * Write the line to the logs. The line to write will never contains * trailing new line character. * - * @param level the level - * @param line the line without trailing \n + * \param level the level + * \param line the line without trailing \n */ virtual void write(Level level, const std::string &line) noexcept = 0; }; @@ -77,13 +77,13 @@ * -------------------------------------------------------- */ /** - * @class Console - * @brief Logger implementation for console output + * \class Console + * \brief Logger implementation for console output */ class Console : public Interface { public: /** - * @copydoc Interface::write + * \copydoc Interface::write */ void write(Level level, const std::string &line) noexcept override; }; @@ -93,8 +93,8 @@ * -------------------------------------------------------- */ /** - * @class File - * @brief Output to a file + * \class File + * \brief Output to a file */ class File : public Interface { private: @@ -108,13 +108,13 @@ * * The same path can be used for all levels. * - * @param normal the path to the normal logs - * @param errors the path to the errors logs + * \param normal the path to the normal logs + * \param errors the path to the errors logs */ File(std::string normal, std::string errors); /** - * @copydoc Interface::write + * \copydoc Interface::write */ void write(Level level, const std::string &line) noexcept override; }; @@ -124,15 +124,15 @@ * -------------------------------------------------------- */ /** - * @class Silent - * @brief Use to disable logs + * \class Silent + * \brief Use to disable logs * * Useful for unit tests when some classes may emits log. */ class Silent : public Interface { public: /** - * @copydoc Interface::write + * \copydoc Interface::write */ void write(Level level, const std::string &line) noexcept override; }; @@ -144,8 +144,8 @@ #if defined(HAVE_SYSLOG) /** - * @class Syslog - * @brief Implements logger into syslog + * \class Syslog + * \brief Implements logger into syslog */ class Syslog : public Interface { public: @@ -160,7 +160,7 @@ ~Syslog(); /** - * @copydoc Interface::write + * \copydoc Interface::write */ void write(Level level, const std::string &line) noexcept override; }; @@ -174,44 +174,44 @@ /** * Update the logger interface. * - * @param iface the new interface + * \param iface the new interface */ void setInterface(std::unique_ptr<Interface> iface) noexcept; /** * Get the stream for informational messages. * - * @return the stream - * @note Has no effect if verbose is set to false. + * \return the stream + * \note Has no effect if verbose is set to false. */ std::ostream &info() noexcept; /** * Get the stream for warnings. * - * @return the stream + * \return the stream */ std::ostream &warning() noexcept; /** * Get the stream for debug messages. * - * @return the stream - * @note Has no effect if compiled in release mode. + * \return the stream + * \note Has no effect if compiled in release mode. */ std::ostream &debug() noexcept; /** * Tells if verbose is enabled. * - * @return true if enabled + * \return true if enabled */ bool isVerbose() noexcept; /** * Set the verbosity mode. * - * @param mode the new mode + * \param mode the new mode */ void setVerbose(bool mode) noexcept;
--- a/lib/irccd/options.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/options.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_OPTION_PARSER_HPP /** - * @file options.hpp - * @brief Basic options parsing. + * \file options.hpp + * \brief Basic options parsing. */ #include <exception> @@ -38,8 +38,8 @@ namespace parser { /** - * @class InvalidOption - * @brief This exception is thrown when an invalid option has been found. + * \class InvalidOption + * \brief This exception is thrown when an invalid option has been found. */ class InvalidOption : public std::exception { private: @@ -54,7 +54,7 @@ /** * Construct the exception. * - * @param arg the argument missing + * \param arg the argument missing */ inline InvalidOption(std::string arg) : argument(std::move(arg)) @@ -65,7 +65,7 @@ /** * Get the error message. * - * @return the error message + * \return the error message */ const char *what() const noexcept override { @@ -74,8 +74,8 @@ }; /** - * @class MissingValue - * @brief This exception is thrown when an option requires a value and no value has been given + * \class MissingValue + * \brief This exception is thrown when an option requires a value and no value has been given */ class MissingValue : public std::exception { private: @@ -90,7 +90,7 @@ /** * Construct the exception. * - * @param arg the argument that requires a value + * \param arg the argument that requires a value */ inline MissingValue(std::string arg) : argument(std::move(arg)) @@ -101,7 +101,7 @@ /** * Get the error message. * - * @return the error message + * \return the error message */ const char *what() const noexcept override { @@ -122,24 +122,24 @@ /** * Extract the command line options and return a result. * - * @param args the arguments - * @param definition - * @warning the arguments vector is modified in place to remove parsed options - * @throw MissingValue - * @throw InvalidOption + * \param args the arguments + * \param definition + * \warning the arguments vector is modified in place to remove parsed options + * \throw MissingValue + * \throw InvalidOption */ Result read(std::vector<std::string> &args, const Options &definition); /** * Overloaded function for usage with main() arguments. * - * @param argc the number of arguments - * @param argv the argument vector - * @param definition - * @note don't forget to remove the first argv[0] argument - * @warning the argc and argv are modified in place to remove parsed options - * @throw MissingValue - * @throw InvalidOption + * \param argc the number of arguments + * \param argv the argument vector + * \param definition + * \note don't forget to remove the first argv[0] argument + * \warning the argc and argv are modified in place to remove parsed options + * \throw MissingValue + * \throw InvalidOption */ Result read(int &argc, char **&argv, const Options &definition);
--- a/lib/irccd/path.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/path.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_PATH_HPP /** - * @file path.hpp - * @brief Path management. + * \file path.hpp + * \brief Path management. */ #include <string> @@ -37,8 +37,8 @@ extern const char Separator; /** - * @enum Path - * @brief Which special path to get + * \enum Path + * \brief Which special path to get */ enum Path { PathConfig, //!< Configuration files @@ -48,8 +48,8 @@ }; /** - * @enum Owner - * @brief For paths, get the installation path or the user ones + * \enum Owner + * \brief For paths, get the installation path or the user ones */ enum Owner { OwnerSystem, //!< System wide @@ -62,15 +62,15 @@ * It use system dependant program path lookup if available and fallbacks to the path given as argument if any failure * was encoutered. * - * @param argv0 the path to the executable (argv[0]) + * \param argv0 the path to the executable (argv[0]) */ void setApplicationPath(const std::string &argv0); /** * Clean a path by removing any extra / or \ and add a trailing one. * - * @param path the path - * @return the updated path + * \param path the path + * \return the updated path */ std::string clean(std::string path); @@ -79,10 +79,10 @@ * * The path is always terminated by a trailing / or \\. * - * @pre setApplicationPath must have been called - * @param path the type of path - * @param owner system or user wide - * @return the path + * \pre setApplicationPath must have been called + * \param path the type of path + * \param owner system or user wide + * \return the path */ std::string get(Path path, Owner owner); @@ -92,9 +92,9 @@ * This function will add more directories than pathSystem*() and pathUser*() functions, for example * it will add some path if irccd is relocatable. * - * @pre setApplicationPath must have been called - * @param path the type of path - * @return the list of preferred directories in order + * \pre setApplicationPath must have been called + * \param path the type of path + * \return the list of preferred directories in order */ std::vector<std::string> list(Path path);
--- a/lib/irccd/plugin.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/plugin.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_PLUGIN_HPP /** - * @file plugin.hpp - * @brief Irccd plugins + * \file plugin.hpp + * \brief Irccd plugins */ #include <memory> @@ -41,8 +41,8 @@ class ServerWhois; /** - * @class PluginInfo - * @brief Plugin information + * \class PluginInfo + * \brief Plugin information */ class PluginInfo { public: @@ -68,8 +68,8 @@ using PluginTimers = std::unordered_set<std::shared_ptr<Timer>>; /** - * @class Plugin - * @brief JavaScript plugin + * \class Plugin + * \brief JavaScript plugin * * A plugin is identified by name and can be loaded and unloaded * at runtime. @@ -117,10 +117,10 @@ /** * Correct constructor. * - * @param name the plugin id - * @param path the fully resolved path to the plugin - * @param config the plugin configuration - * @throws std::runtime_error on errors + * \param name the plugin id + * \param path the fully resolved path to the plugin + * \param config the plugin configuration + * \throws std::runtime_error on errors */ Plugin(std::string name, std::string path, const PluginConfig &config = PluginConfig()); @@ -137,21 +137,21 @@ /** * Add a timer to the plugin. * - * @param timer the timer to add + * \param timer the timer to add */ void addTimer(std::shared_ptr<Timer> timer) noexcept; /** * Remove a timer from a plugin. * - * @param timer + * \param timer */ void removeTimer(const std::shared_ptr<Timer> &timer) noexcept; /** * Access the Duktape context. * - * @return the context + * \return the context */ inline duk::Context &context() noexcept { @@ -163,67 +163,67 @@ * onCommand if the messages starts with the command character * plus the plugin name. * - * @param server the server - * @param origin the user who sent the message - * @param channel the channel - * @param message the message or command + * \param server the server + * \param origin the user who sent the message + * \param channel the channel + * \param message the message or command */ void onCommand(std::shared_ptr<Server> server, std::string origin, std::string channel, std::string message); /** * On successful connection. * - * @param server the server + * \param server the server */ void onConnect(std::shared_ptr<Server> server); /** * On channel mode. * - * @param server the server - * @param origin the ouser who has changed the mode - * @param channel the channel - * @param mode the mode - * @param arg the optional mode argument + * \param server the server + * \param origin the ouser who has changed the mode + * \param channel the channel + * \param mode the mode + * \param arg the optional mode argument */ void onChannelMode(std::shared_ptr<Server> server, std::string origin, std::string channel, std::string mode, std::string arg); /** * On a channel notice. * - * @param server the server - * @param origin the user who sent the notice - * @param channel on which channel - * @param notice the message + * \param server the server + * \param origin the user who sent the notice + * \param channel on which channel + * \param notice the message */ void onChannelNotice(std::shared_ptr<Server> server, std::string origin, std::string channel, std::string notice); /** * On invitation. * - * @param server the server - * @param origin the user who invited you - * @param channel the channel + * \param server the server + * \param origin the user who invited you + * \param channel the channel */ void onInvite(std::shared_ptr<Server> server, std::string origin, std::string channel); /** * On join. * - * @param server the server - * @param origin the user who joined - * @param channel the channel + * \param server the server + * \param origin the user who joined + * \param channel the channel */ void onJoin(std::shared_ptr<Server> server, std::string origin, std::string channel); /** * On kick. * - * @param server the server - * @param origin the user who kicked the target - * @param channel the channel - * @param target the kicked target - * @param reason the optional reason + * \param server the server + * \param origin the user who kicked the target + * \param channel the channel + * \param target the kicked target + * \param reason the optional reason */ void onKick(std::shared_ptr<Server> server, std::string origin, std::string channel, std::string target, std::string reason); @@ -235,84 +235,84 @@ /** * On channel message. * - * @param server the server - * @param origin the user who sent the message - * @param channel the channel - * @param message the message or command + * \param server the server + * \param origin the user who sent the message + * \param channel the channel + * \param message the message or command */ void onMessage(std::shared_ptr<Server> server, std::string origin, std::string channel, std::string message); /** * On CTCP Action. * - * @param server the server - * @param origin the user who sent the message - * @param channel the channel (may also be your nickname) - * @param message the message + * \param server the server + * \param origin the user who sent the message + * \param channel the channel (may also be your nickname) + * \param message the message */ void onMe(std::shared_ptr<Server> server, std::string origin, std::string channel, std::string message); /** * On user mode change. * - * @param server the server - * @param origin the person who changed the mode - * @param mode the new mode + * \param server the server + * \param origin the person who changed the mode + * \param mode the new mode */ void onMode(std::shared_ptr<Server> server, std::string origin, std::string mode); /** * On names listing. * - * @param server the server - * @param channel the channel - * @param list the list of nicknames + * \param server the server + * \param channel the channel + * \param list the list of nicknames */ void onNames(std::shared_ptr<Server> server, std::string channel, std::vector<std::string> list); /** * On nick change. * - * @param server the server - * @param origin the user that changed its nickname - * @param nick the new nickname + * \param server the server + * \param origin the user that changed its nickname + * \param nick the new nickname */ void onNick(std::shared_ptr<Server> server, std::string origin, std::string nick); /** * On user notice. * - * @param server the server - * @param origin the user who sent the notice - * @param notice the notice + * \param server the server + * \param origin the user who sent the notice + * \param notice the notice */ void onNotice(std::shared_ptr<Server> server, std::string origin, std::string notice); /** * On part. * - * @param server the server - * @param origin the user who left - * @param channel the channel - * @param reason the optional reason + * \param server the server + * \param origin the user who left + * \param channel the channel + * \param reason the optional reason */ void onPart(std::shared_ptr<Server> server, std::string origin, std::string channel, std::string reason); /** * On user query. * - * @param server the server - * @param origin the user who sent the query - * @param message the message + * \param server the server + * \param origin the user who sent the query + * \param message the message */ void onQuery(std::shared_ptr<Server> server, std::string origin, std::string message); /** * On user query command. * - * @param server the server - * @param origin the user who sent the query - * @param message the message + * \param server the server + * \param origin the user who sent the query + * \param message the message */ void onQueryCommand(std::shared_ptr<Server> server, std::string origin, std::string message); @@ -324,10 +324,10 @@ /** * On topic change. * - * @param server the server - * @param origin the user who sent the topic - * @param channel the channel - * @param topic the new topic + * \param server the server + * \param origin the user who sent the topic + * \param channel the channel + * \param topic the new topic */ void onTopic(std::shared_ptr<Server> server, std::string origin, std::string channel, std::string topic); @@ -339,8 +339,8 @@ /** * On whois information. * - * @param server the server - * @param info the info + * \param server the server + * \param info the info */ void onWhois(std::shared_ptr<Server> server, ServerWhois info); }; @@ -348,7 +348,7 @@ namespace duk { /** - * @brief Push plugin information. + * \brief Push plugin information. */ template <> class TypeTraits<irccd::PluginInfo> { @@ -356,8 +356,8 @@ /** * Push the plugin information as JavaScript object. * - * @param ctx the context - * @param info the plugin information + * \param ctx the context + * \param info the plugin information */ static void push(ContextPtr ctx, const PluginInfo &info); };
--- a/lib/irccd/rule.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/rule.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_RULE_HPP /** - * @file rule.hpp - * @brief Rule description + * \file rule.hpp + * \brief Rule description */ #include <sstream> @@ -38,8 +38,8 @@ using RuleSet = std::unordered_set<std::string>; /** - * @enum RuleAction - * @brief Rule action + * \enum RuleAction + * \brief Rule action */ enum class RuleAction { Accept, //!< The event is accepted (default) @@ -47,8 +47,8 @@ }; /** - * @class Rule - * @brief Manage rule to activate or deactive events. + * \class Rule + * \brief Manage rule to activate or deactive events. */ class Rule final { private: @@ -69,13 +69,13 @@ /** * Resolve the action to execute with the specified list of rules. * - * @param rules the list of rules - * @param server the server name - * @param channel the channel name - * @param origin the origin - * @param plugin the plugin name - * @param event the event name (e.g onKick) - * @return true if the plugin must be called + * \param rules the list of rules + * \param server the server name + * \param channel the channel name + * \param origin the origin + * \param plugin the plugin name + * \param event the event name (e.g onKick) + * \return true if the plugin must be called */ static bool solve(const std::vector<Rule> &rules, const std::string &server, @@ -87,13 +87,13 @@ /** * Rule constructor. * - * @param servers the server list - * @param channels the channels - * @param nicknames the nicknames - * @param plugins the plugins - * @param events the events - * @param action the rule action - * @throw std::invalid_argument if events are invalid + * \param servers the server list + * \param channels the channels + * \param nicknames the nicknames + * \param plugins the plugins + * \param events the events + * \param action the rule action + * \throw std::invalid_argument if events are invalid */ Rule(RuleSet servers = RuleSet{}, RuleSet channels = RuleSet{}, @@ -105,12 +105,12 @@ /** * Check if that rule apply for the given criterias. * - * @param server the server - * @param channel the channel - * @param nick the origin - * @param plugin the plugin - * @param event the event - * @return true if match + * \param server the server + * \param channel the channel + * \param nick the origin + * \param plugin the plugin + * \param event the event + * \return true if match */ bool match(const std::string &server, const std::string &channel, @@ -121,42 +121,42 @@ /** * Get the action. * - * @return the action + * \return the action */ RuleAction action() const noexcept; /** * Get the servers. * - * @return the servers + * \return the servers */ const RuleSet &servers() const noexcept; /** * Get the channels. * - * @return the channels + * \return the channels */ const RuleSet &channels() const noexcept; /** * Get the origins. * - * @return the origins + * \return the origins */ const RuleSet &origins() const noexcept; /** * Get the plugins. * - * @return the plugins + * \return the plugins */ const RuleSet &plugins() const noexcept; /** * Get the events. * - * @return the events + * \return the events */ const RuleSet &events() const noexcept; };
--- a/lib/irccd/server-private.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/server-private.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -28,7 +28,7 @@ namespace irccd { /** - * @brief Bridge for libircclient + * \brief Bridge for libircclient */ class Server::Session { public: @@ -68,7 +68,7 @@ /** * Get the handle. * - * @return the handle + * \return the handle */ inline Handle &handle() noexcept {
--- a/lib/irccd/server-state.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/server-state.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_SERVER_STATE_HPP /** - * @file server-state.hpp - * @brief Server state. + * \file server-state.hpp + * \brief Server state. */ #include <irccd/sysconfig.hpp> @@ -34,14 +34,14 @@ class Server; /** - * @class ServerState - * @brief Server current state. + * \class ServerState + * \brief Server current state. */ class ServerState { public: /** - * @enum Type - * @brief Server state + * \enum Type + * \brief Server state */ enum Type { Undefined, //!< Not defined yet @@ -69,25 +69,25 @@ /** * Create the server state. * - * @pre type must be valid - * @param type the type + * \pre type must be valid + * \param type the type */ ServerState(Type type); /** * Prepare the state. * - * @param server the server - * @param setinput the read set - * @param setoutput the write set - * @param maxfd the maximum fd + * \param server the server + * \param setinput the read set + * \param setoutput the write set + * \param maxfd the maximum fd */ void prepare(Server &server, fd_set &setinput, fd_set &setoutput, net::Handle &maxfd); /** * Get the state type. * - * @return the type + * \return the type */ inline Type type() const noexcept {
--- a/lib/irccd/server.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/server.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_SERVER_HPP /** - * @file server.hpp - * @brief IRC Server. + * \file server.hpp + * \brief IRC Server. */ #include <cstdint> @@ -44,8 +44,8 @@ namespace irccd { /** - * @class ServerIdentity - * @brief Identity to use when connecting + * \class ServerIdentity + * \brief Identity to use when connecting */ class ServerIdentity { public: @@ -57,8 +57,8 @@ }; /** - * @class ServerChannel - * @brief A channel to join with an optional password + * \class ServerChannel + * \brief A channel to join with an optional password */ class ServerChannel { public: @@ -72,8 +72,8 @@ using ServerChannels = std::vector<ServerChannel>; /** - * @enum ServerChanMode - * @brief Prefixes for nicknames + * \enum ServerChanMode + * \brief Prefixes for nicknames */ enum class ServerChanMode { Creator = 'O', //!< Channel creator @@ -84,8 +84,8 @@ }; /** - * @class ServerWhois - * @brief Describe a whois information + * \class ServerWhois + * \brief Describe a whois information * * This is provided when whois command was requested. */ @@ -99,8 +99,8 @@ }; /** - * @class ServerInfo - * @brief Server information + * \class ServerInfo + * \brief Server information * * This class contains everything needed to connect to a server. */ @@ -121,8 +121,8 @@ }; /** - * @class ServerSettings - * @brief Contains settings to tweak the server + * \class ServerSettings + * \brief Contains settings to tweak the server * * This class contains additional settings that tweaks the * server operations. @@ -153,8 +153,8 @@ using ServerCommand = std::function<bool ()>; /** - * @class Server - * @brief The class that connect to a IRC server + * \class Server + * \brief The class that connect to a IRC server * * The server is a class that stores callbacks which will be called on IRC events. It is the lowest part of the * connection to a server, it can be used directly by the user to connect to a server. @@ -441,17 +441,17 @@ /** * Split a channel from the form channel:password into a ServerChannel object. * - * @param value the value - * @return a channel + * \param value the value + * \return a channel */ static ServerChannel splitChannel(const std::string &value); /** * Construct a server. * - * @param info the information - * @param identity the identity - * @param settings the settings + * \param info the information + * \param identity the identity + * \param settings the settings */ Server(ServerInfo info, ServerIdentity identity = {}, ServerSettings settings = {}); @@ -467,8 +467,8 @@ * If the server is installed into the ServerManager, it is called * automatically. * - * @param type the new state type - * @warning Not thread-safe + * \param type the new state type + * \warning Not thread-safe */ inline void next(ServerState::Type type) { @@ -480,7 +480,7 @@ * * If the server is installed into irccd, it is called automatically. * - * @warning Not thread-safe + * \warning Not thread-safe */ void update() noexcept; @@ -488,8 +488,8 @@ * Request to disconnect. This function does not notify the * ServerService. * - * @see Irccd::serverDisconnect - * @note Thread-safe + * \see Irccd::serverDisconnect + * \note Thread-safe */ void disconnect() noexcept; @@ -497,8 +497,8 @@ * Asks for a reconnection. This function does not notify the * ServerService. * - * @see Irccd::serverReconnect - * @note Thread-safe + * \see Irccd::serverReconnect + * \note Thread-safe */ void reconnect() noexcept; @@ -509,7 +509,7 @@ * If the server is installed into the ServerManager, it is called * automatically. * - * @note Thread-safe + * \note Thread-safe */ void flush() noexcept; @@ -519,7 +519,7 @@ * If the server is installed into the ServerManager, it is called * automatically. * - * @warning Not thread-safe + * \warning Not thread-safe */ inline void prepare(fd_set &setinput, fd_set &setoutput, net::Handle &maxfd) noexcept { @@ -532,18 +532,18 @@ * If the server is installed into the ServerManager, it is called * automatically. * - * @param setinput - * @param setoutput - * @throw any exception that have been throw from user functions + * \param setinput + * \param setoutput + * \throw any exception that have been throw from user functions */ void sync(fd_set &setinput, fd_set &setoutput) noexcept; /** * Get the server information. * - * @warning This overload should not be used by the user, it is required to + * \warning This overload should not be used by the user, it is required to * update the nickname. - * @return the server information + * \return the server information */ inline ServerInfo &info() noexcept { @@ -553,7 +553,7 @@ /** * Get the server information. * - * @return the server information + * \return the server information */ inline const ServerInfo &info() const noexcept { @@ -563,9 +563,9 @@ /** * Get the server settings. * - * @warning This overload should not be used by the user, it is required to + * \warning This overload should not be used by the user, it is required to * update the reconnection information. - * @return the settings + * \return the settings */ inline ServerSettings &settings() noexcept { @@ -575,7 +575,7 @@ /** * Get the server settings. * - * @return the settings + * \return the settings */ inline const ServerSettings &settings() const noexcept { @@ -585,7 +585,7 @@ /** * Get the identity. * - * @return the identity + * \return the identity */ inline ServerIdentity &identity() noexcept { @@ -595,7 +595,7 @@ /** * Overloaded function * - * @return the identity + * \return the identity */ inline const ServerIdentity &identity() const noexcept { @@ -605,7 +605,7 @@ /** * Get the current state identifier. Should not be used by user code. * - * @note Thread-safe but the state may change just after the call + * \note Thread-safe but the state may change just after the call */ inline ServerState::Type type() const noexcept { @@ -615,7 +615,7 @@ /** * Get the private session. * - * @return the session + * \return the session */ inline Session &session() noexcept { @@ -625,36 +625,36 @@ /** * Change the channel mode. * - * @param channel the channel - * @param mode the new mode - * @note Thread-safe + * \param channel the channel + * \param mode the new mode + * \note Thread-safe */ void cmode(std::string channel, std::string mode); /** * Send a channel notice. * - * @param channel the channel - * @param message message notice - * @note Thread-safe + * \param channel the channel + * \param message message notice + * \note Thread-safe */ void cnotice(std::string channel, std::string message) noexcept; /** * Invite a user to a channel. * - * @param target the target nickname - * @param channel the channel - * @note Thread-safe + * \param target the target nickname + * \param channel the channel + * \note Thread-safe */ void invite(std::string target, std::string channel) noexcept; /** * Join a channel, the password is optional and can be kept empty. * - * @param channel the channel to join - * @param password the optional password - * @note Thread-safe + * \param channel the channel to join + * \param password the optional password + * \note Thread-safe */ void join(std::string channel, std::string password = "") noexcept; @@ -662,10 +662,10 @@ * Kick someone from the channel. Please be sure to have the rights * on that channel because errors won't be reported. * - * @param target the target to kick - * @param channel from which channel - * @param reason the optional reason - * @note Thread-safe + * \param target the target to kick + * \param channel from which channel + * \param reason the optional reason + * \note Thread-safe */ void kick(std::string target, std::string channel, std::string reason = "") noexcept; @@ -673,51 +673,51 @@ * Send a CTCP Action as known as /me. The target may be either a * channel or a nickname. * - * @param target the nickname or the channel - * @param message the message - * @note Thread-safe + * \param target the nickname or the channel + * \param message the message + * \note Thread-safe */ void me(std::string target, std::string message); /** * Send a message to the specified target or channel. * - * @param target the target - * @param message the message - * @note Thread-safe + * \param target the target + * \param message the message + * \note Thread-safe */ void message(std::string target, std::string message); /** * Change your user mode. * - * @param mode the mode - * @note Thread-safe + * \param mode the mode + * \note Thread-safe */ void mode(std::string mode); /** * Request the list of names. * - * @param channel the channel - * @note Thread-safe + * \param channel the channel + * \note Thread-safe */ void names(std::string channel); /** * Change your nickname. * - * @param newnick the new nickname to use - * @note Thread-safe + * \param newnick the new nickname to use + * \note Thread-safe */ void nick(std::string newnick); /** * Send a private notice. * - * @param target the target - * @param message the notice message - * @note Thread-safe + * \param target the target + * \param message the notice message + * \note Thread-safe */ void notice(std::string target, std::string message); @@ -726,9 +726,9 @@ * * Please note that the reason is not supported on all servers so if you want portability, don't provide it. * - * @param channel the channel to leave - * @param reason the optional reason - * @note Thread-safe + * \param channel the channel to leave + * \param reason the optional reason + * \note Thread-safe */ void part(std::string channel, std::string reason = ""); @@ -736,26 +736,26 @@ * Send a raw message to the IRC server. You don't need to add * message terminators. * - * @warning Use this function with care - * @param raw the raw message (without `\r\n\r\n`) - * @note Thread-safe + * \warning Use this function with care + * \param raw the raw message (without `\r\n\r\n`) + * \note Thread-safe */ void send(std::string raw); /** * Change the channel topic. * - * @param channel the channel - * @param topic the desired topic - * @note Thread-safe + * \param channel the channel + * \param topic the desired topic + * \note Thread-safe */ void topic(std::string channel, std::string topic); /** * Request for whois information. * - * @param target the target nickname - * @note Thread-safe + * \param target the target nickname + * \note Thread-safe */ void whois(std::string target); };
--- a/lib/irccd/sockets.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/sockets.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_SOCKETS_HPP /** - * @file sockets.hpp - * @brief Portable socket abstraction + * \file sockets.hpp + * \brief Portable socket abstraction * * # Introduction * @@ -91,7 +91,7 @@ /** * Defines the default Listener backend to use. * - * @note Do not rely on the value shown in doxygen. + * \note Do not rely on the value shown in doxygen. */ #if defined(_WIN32) # if !defined(SOCKET_DEFAULT_BACKEND) @@ -268,8 +268,8 @@ namespace ssl { /** - * @enum Method - * @brief Which OpenSSL method to use. + * \enum Method + * \brief Which OpenSSL method to use. */ enum Method { Tlsv1, //!< TLS v1.2 (recommended) @@ -328,15 +328,15 @@ * Get the last socket system error. The error is set from errno or from * WSAGetLastError on Windows. * - * @return a string message + * \return a string message */ std::string error(); /** * Get the last system error. * - * @param errn the error number (errno or WSAGetLastError) - * @return the error + * \param errn the error number (errno or WSAGetLastError) + * \return the error */ std::string error(int errn); @@ -352,14 +352,14 @@ /* {{{ Error */ /** - * @class Error - * @brief Base class for sockets error + * \class Error + * \brief Base class for sockets error */ class Error : public std::exception { public: /** - * @enum Code - * @brief Which kind of error + * \enum Code + * \brief Which kind of error */ enum Code { Timeout, ///!< The action did timeout @@ -376,33 +376,33 @@ /** * Constructor that use the last system error. * - * @param code which kind of error - * @param function the function name + * \param code which kind of error + * \param function the function name */ Error(Code code, std::string function); /** * Constructor that use the system error set by the user. * - * @param code which kind of error - * @param function the function name - * @param error the error + * \param code which kind of error + * \param function the function name + * \param error the error */ Error(Code code, std::string function, int error); /** * Constructor that set the error specified by the user. * - * @param code which kind of error - * @param function the function name - * @param error the error + * \param code which kind of error + * \param function the function name + * \param error the error */ Error(Code code, std::string function, std::string error); /** * Get which function has triggered the error. * - * @return the function name (e.g connect) + * \return the function name (e.g connect) */ inline const std::string &function() const noexcept { @@ -412,7 +412,7 @@ /** * The error code. * - * @return the code + * \return the code */ inline Code code() const noexcept { @@ -422,7 +422,7 @@ /** * Get the error (only the error content). * - * @return the error + * \return the error */ const char *what() const noexcept { @@ -442,8 +442,8 @@ /* {{{ State */ /** - * @enum State - * @brief Current socket state. + * \enum State + * \brief Current socket state. */ enum class State { Open, //!< Socket is open @@ -468,8 +468,8 @@ /* {{{ Action */ /** - * @enum Action - * @brief Define the current operation that must complete. + * \enum Action + * \brief Define the current operation that must complete. * * Some operations like accept, connect, recv or send must sometimes do several round-trips to complete and the socket * action is set with that enumeration. The user is responsible of calling accept, connect send or recv until the @@ -501,8 +501,8 @@ /* {{{ Condition */ /** - * @enum Condition - * @brief Define the required condition for the socket. + * \enum Condition + * \brief Define the required condition for the socket. * * As explained in Action enumeration, some operations required to be called several times, before calling these * operations, the user must wait the socket to be readable or writable. This can be checked with Socket::condition. @@ -516,9 +516,9 @@ /** * Apply bitwise XOR. * - * @param v1 the first value - * @param v2 the second value - * @return the new value + * \param v1 the first value + * \param v2 the second value + * \return the new value */ constexpr Condition operator^(Condition v1, Condition v2) noexcept { @@ -528,9 +528,9 @@ /** * Apply bitwise AND. * - * @param v1 the first value - * @param v2 the second value - * @return the new value + * \param v1 the first value + * \param v2 the second value + * \return the new value */ constexpr Condition operator&(Condition v1, Condition v2) noexcept { @@ -540,9 +540,9 @@ /** * Apply bitwise OR. * - * @param v1 the first value - * @param v2 the second value - * @return the new value + * \param v1 the first value + * \param v2 the second value + * \return the new value */ constexpr Condition operator|(Condition v1, Condition v2) noexcept { @@ -552,8 +552,8 @@ /** * Apply bitwise NOT. * - * @param v the value - * @return the complement + * \param v the value + * \return the complement */ constexpr Condition operator~(Condition v) noexcept { @@ -563,9 +563,9 @@ /** * Assign bitwise OR. * - * @param v1 the first value - * @param v2 the second value - * @return the new value + * \param v1 the first value + * \param v2 the second value + * \return the new value */ inline Condition &operator|=(Condition &v1, Condition v2) noexcept { @@ -577,9 +577,9 @@ /** * Assign bitwise AND. * - * @param v1 the first value - * @param v2 the second value - * @return the new value + * \param v1 the first value + * \param v2 the second value + * \return the new value */ inline Condition &operator&=(Condition &v1, Condition v2) noexcept { @@ -591,9 +591,9 @@ /** * Assign bitwise XOR. * - * @param v1 the first value - * @param v2 the second value - * @return the new value + * \param v1 the first value + * \param v2 the second value + * \return the new value */ inline Condition &operator^=(Condition &v1, Condition v2) noexcept { @@ -615,15 +615,15 @@ /* {{{ Socket */ /** - * @class Socket - * @brief Base socket class for socket operations. + * \class Socket + * \brief Base socket class for socket operations. * * **Important:** When using non-blocking sockets, some considerations must be taken. See the implementation of the * underlying protocol for more details. * - * @see protocol::Tls - * @see protocol::Tcp - * @see protocol::Udp + * \see protocol::Tls + * \see protocol::Tcp + * \see protocol::Udp */ template <typename Address, typename Protocol> class Socket { @@ -646,13 +646,13 @@ * This is the primary function and the only one that creates the socket handle, all other constructors * are just overloaded functions. * - * @param domain the domain AF_* - * @param type the type SOCK_* - * @param protocol the protocol - * @param iface the implementation - * @throw net::Error on errors - * @post state is set to Open - * @post handle is not set to Invalid + * \param domain the domain AF_* + * \param type the type SOCK_* + * \param protocol the protocol + * \param iface the implementation + * \throw net::Error on errors + * \post state is set to Open + * \post handle is not set to Invalid */ Socket(int domain, int type, int protocol, Protocol iface = {}) : m_proto(std::move(iface)) @@ -677,9 +677,9 @@ * * Domain and type are determined by the Address and Protocol object. * - * @param protocol the protocol - * @param address which type of address - * @throw net::Error on errors + * \param protocol the protocol + * \param address which type of address + * \throw net::Error on errors */ explicit inline Socket(Protocol protocol = {}, const Address &address = {}) : Socket{address.domain(), protocol.type(), 0, std::move(protocol)} @@ -689,11 +689,11 @@ /** * Construct a socket with an already created descriptor. * - * @param handle the native descriptor - * @param state specify the socket state - * @param protocol the type of socket implementation - * @post action is set to None - * @post condition is set to None + * \param handle the native descriptor + * \param state specify the socket state + * \param protocol the type of socket implementation + * \post action is set to None + * \post condition is set to None */ explicit inline Socket(Handle handle, State state = State::Closed, Protocol protocol = {}) noexcept : m_proto(std::move(protocol)) @@ -720,7 +720,7 @@ /** * Transfer ownership from other to this. * - * @param other the other socket + * \param other the other socket */ inline Socket(Socket &&other) noexcept : m_proto(std::move(other.m_proto)) @@ -747,8 +747,8 @@ /** * Access the implementation. * - * @return the implementation - * @warning use this function with care + * \return the implementation + * \warning use this function with care */ inline const Protocol &protocol() const noexcept { @@ -758,7 +758,7 @@ /** * Overloaded function. * - * @return the implementation + * \return the implementation */ inline Protocol &protocol() noexcept { @@ -768,7 +768,7 @@ /** * Get the current socket state. * - * @return the state + * \return the state */ inline State state() const noexcept { @@ -778,8 +778,8 @@ /** * Change the current socket state. * - * @param state the new state - * @warning only implementations should call this function + * \param state the new state + * \warning only implementations should call this function */ inline void setState(State state) noexcept { @@ -789,8 +789,8 @@ /** * Get the pending operation. * - * @return the action to complete before continuing - * @note usually only needed in non-blocking sockets + * \return the action to complete before continuing + * \note usually only needed in non-blocking sockets */ inline Action action() const noexcept { @@ -800,8 +800,8 @@ /** * Change the pending operation. * - * @param action the action - * @warning you should not call this function yourself + * \param action the action + * \warning you should not call this function yourself */ inline void setAction(Action action) noexcept { @@ -811,7 +811,7 @@ /** * Get the condition to wait for. * - * @return the condition + * \return the condition */ inline Condition condition() const noexcept { @@ -821,8 +821,8 @@ /** * Change the condition required. * - * @param condition the condition - * @warning you should not call this function yourself + * \param condition the condition + * \warning you should not call this function yourself */ inline void setCondition(Condition condition) noexcept { @@ -832,10 +832,10 @@ /** * Set an option for the socket. Wrapper of setsockopt(2). * - * @param level the setting level - * @param name the name - * @param arg the value - * @throw net::Error on errors + * \param level the setting level + * \param name the name + * \param arg the value + * \throw net::Error on errors */ template <typename Argument> void set(int level, int name, const Argument &arg) @@ -850,8 +850,8 @@ * * The object must have `set(Socket<Address, Protocol> &) const`. * - * @param option the option - * @throw net::Error on errors + * \param option the option + * \throw net::Error on errors */ template <typename Option> inline void set(const Option &option) @@ -862,9 +862,9 @@ /** * Get an option for the socket. Wrapper of getsockopt(2). * - * @param level the setting level - * @param name the name - * @throw net::Error on errors + * \param level the setting level + * \param name the name + * \throw net::Error on errors */ template <typename Argument> Argument get(int level, int name) @@ -887,8 +887,8 @@ * The object must have `T get(Socket<Address, Protocol> &) const`, T can be any type and it is the value * returned from this function. * - * @return the same value as get() in the option - * @throw net::Error on errors + * \return the same value as get() in the option + * \throw net::Error on errors */ template <typename Option> inline auto get() -> decltype(std::declval<Option>().get(*this)) @@ -899,8 +899,8 @@ /** * Get the native handle. * - * @return the handle - * @warning Not portable + * \return the handle + * \warning Not portable */ inline Handle handle() const noexcept { @@ -910,10 +910,10 @@ /** * Bind using a native address. * - * @param address the address - * @param length the size - * @pre state must not be Bound - * @throw net::Error on errors + * \param address the address + * \param length the size + * \pre state must not be Bound + * \throw net::Error on errors */ void bind(const sockaddr *address, socklen_t length) { @@ -929,8 +929,8 @@ /** * Overload that takes an address. * - * @param address the address - * @throw net::Error on errors + * \param address the address + * \throw net::Error on errors */ inline void bind(const Address &address) { @@ -940,9 +940,9 @@ /** * Listen for pending connection. * - * @param max the maximum number - * @pre state must be Bound - * @throw net::Error on errors + * \param max the maximum number + * \pre state must be Bound + * \throw net::Error on errors */ inline void listen(int max = 128) { @@ -959,12 +959,12 @@ * If connection cannot be established immediately, connect with no argument must be called again. See * the underlying protocol for more information. * - * @pre state must be State::Open - * @param address the address - * @param length the the address length - * @throw net::Error on errors - * @post state is set to State::Connecting or State::Connected - * @note For non-blocking sockets, see the underlying protocol function for more details + * \pre state must be State::Open + * \param address the address + * \param length the the address length + * \throw net::Error on errors + * \post state is set to State::Connecting or State::Connected + * \note For non-blocking sockets, see the underlying protocol function for more details */ void connect(const sockaddr *address, socklen_t length) { @@ -984,7 +984,7 @@ * * Effectively call connect(address.address(), address.length()); * - * @param address the address + * \param address the address */ inline void connect(const Address &address) { @@ -994,8 +994,8 @@ /** * Continue the connection, only required with non-blocking sockets. * - * @pre state must be State::Connecting - * @throw net::Error on errors + * \pre state must be State::Connecting + * \throw net::Error on errors */ void connect() { @@ -1016,12 +1016,12 @@ * If the client cannot be accepted immediately, the client is returned and accept with no arguments * must be called on it. See the underlying protocol for more information. * - * @pre state must be State::Bound - * @param info the address where to store client's information (optional) - * @return the new socket - * @throw Error on errors - * @post returned client's state is set to State::Accepting or State::Accepted - * @note For non-blocking sockets, see the underlying protocol function for more details + * \pre state must be State::Bound + * \param info the address where to store client's information (optional) + * \return the new socket + * \throw Error on errors + * \post returned client's state is set to State::Accepting or State::Accepted + * \note For non-blocking sockets, see the underlying protocol function for more details */ Socket<Address, Protocol> accept(Address *info) { @@ -1057,10 +1057,10 @@ * Continue the accept process on this client. This function must be called only when the socket is * ready to be readable or writable! (see condition). * - * @pre state must be State::Accepting - * @throw Error on errors - * @post if connection is complete, state is changed to State::Accepted, action and condition are unset - * @post if connection is still in progress, condition is set + * \pre state must be State::Accepting + * \throw Error on errors + * \post if connection is complete, state is changed to State::Accepted, action and condition are unset + * \post if connection is still in progress, condition is set */ void accept() { @@ -1080,9 +1080,9 @@ /** * Get the local name. This is a wrapper of getsockname(). * - * @return the address - * @throw Error on failures - * @pre state() must not be State::Closed + * \return the address + * \throw Error on failures + * \pre state() must not be State::Closed */ Address address() const { @@ -1106,12 +1106,12 @@ * * If action is set to Action::None and result is set to 0, disconnection occured. * - * @param data the destination buffer - * @param length the buffer length - * @pre action must not be Action::Send - * @return the number of bytes received or 0 - * @throw Error on error - * @note For non-blocking sockets, see the underlying protocol function for more details + * \param data the destination buffer + * \param length the buffer length + * \pre action must not be Action::Send + * \return the number of bytes received or 0 + * \throw Error on error + * \note For non-blocking sockets, see the underlying protocol function for more details */ unsigned recv(void *data, unsigned length) { @@ -1128,9 +1128,9 @@ /** * Overloaded function. * - * @param count the number of bytes to receive - * @return the string - * @throw Error on error + * \param count the number of bytes to receive + * \return the string + * \throw Error on error */ inline std::string recv(unsigned count) { @@ -1149,12 +1149,12 @@ * If the operation cannot be complete immediately, 0 is returned and user must call the function * again when ready. See the underlying protocol for more information. * - * @param data the data buffer - * @param length the buffer length - * @return the number of bytes sent or 0 - * @pre action() must not be Flag::Receive - * @throw Error on error - * @note For non-blocking sockets, see the underlying protocol function for more details + * \param data the data buffer + * \param length the buffer length + * \return the number of bytes sent or 0 + * \pre action() must not be Flag::Receive + * \throw Error on error + * \note For non-blocking sockets, see the underlying protocol function for more details */ unsigned send(const void *data, unsigned length) { @@ -1174,9 +1174,9 @@ /** * Overloaded function. * - * @param data the string to send - * @return the number of bytes sent - * @throw Error on error + * \param data the string to send + * \return the number of bytes sent + * \throw Error on error */ inline unsigned send(const std::string &data) { @@ -1189,13 +1189,13 @@ * If the operation cannot be complete immediately, 0 is returned and user must call the function * again when ready. See the underlying protocol for more information. * - * @param data the buffer - * @param length the buffer length - * @param address the client address - * @param addrlen the address length - * @return the number of bytes sent - * @throw net::Error on errors - * @note For non-blocking sockets, see the underlying protocol function for more details + * \param data the buffer + * \param length the buffer length + * \param address the client address + * \param addrlen the address length + * \return the number of bytes sent + * \throw net::Error on errors + * \note For non-blocking sockets, see the underlying protocol function for more details */ inline unsigned sendto(const void *data, unsigned length, const sockaddr *address, socklen_t addrlen) { @@ -1205,11 +1205,11 @@ /** * Overloaded function. * - * @param data the buffer - * @param length the buffer length - * @param address the destination - * @return the number of bytes sent - * @throw net::Error on errors + * \param data the buffer + * \param length the buffer length + * \param address the destination + * \return the number of bytes sent + * \throw net::Error on errors */ inline unsigned sendto(const void *data, unsigned length, const Address &address) { @@ -1219,10 +1219,10 @@ /** * Overloaded function. * - * @param data the data - * @param address the address - * @return the number of bytes sent - * @throw net:;Error on errors + * \param data the data + * \param address the address + * \return the number of bytes sent + * \throw net:;Error on errors */ inline unsigned sendto(const std::string &data, const Address &address) { @@ -1235,13 +1235,13 @@ * If the operation cannot be complete immediately, 0 is returned and user must call the function * again when ready. See the underlying protocol for more information. * - * @param data the destination buffer - * @param length the buffer length - * @param address the address destination - * @param addrlen the address length (in/out) - * @return the number of bytes received - * @throw net::Error on errors - * @note For non-blocking sockets, see the underlying protocol function for more details + * \param data the destination buffer + * \param length the buffer length + * \param address the address destination + * \param addrlen the address length (in/out) + * \return the number of bytes received + * \throw net::Error on errors + * \note For non-blocking sockets, see the underlying protocol function for more details */ inline unsigned recvfrom(void *data, unsigned length, sockaddr *address, socklen_t *addrlen) { @@ -1251,11 +1251,11 @@ /** * Overloaded function. * - * @param data the destination buffer - * @param length the buffer length - * @param info the address destination - * @return the number of bytes received - * @throw net::Error on errors + * \param data the destination buffer + * \param length the buffer length + * \param info the address destination + * \return the number of bytes received + * \throw net::Error on errors */ inline unsigned recvfrom(void *data, unsigned length, Address *info = nullptr) { @@ -1274,10 +1274,10 @@ /** * Overloaded function. * - * @param count the maximum number of bytes to receive - * @param info the client information - * @return the string - * @throw net::Error on errors + * \param count the maximum number of bytes to receive + * \param info the client information + * \return the string + * \throw net::Error on errors */ std::string recvfrom(unsigned count, Address *info = nullptr) { @@ -1314,7 +1314,7 @@ /** * Assignment operator forbidden. * - * @return *this + * \return *this */ Socket &operator=(const Socket &) = delete; @@ -1322,8 +1322,8 @@ * Transfer ownership from other to this. The other socket is left * invalid and will not be closed. * - * @param other the other socket - * @return this + * \param other the other socket + * \return this */ Socket &operator=(Socket &&other) noexcept { @@ -1346,9 +1346,9 @@ /** * Compare two sockets. * - * @param s1 the first socket - * @param s2 the second socket - * @return true if they equals + * \param s1 the first socket + * \param s2 the second socket + * \return true if they equals */ template <typename Address, typename Protocol> bool operator==(const Socket<Address, Protocol> &s1, const Socket<Address, Protocol> &s2) @@ -1359,9 +1359,9 @@ /** * Compare two sockets. * - * @param s1 the first socket - * @param s2 the second socket - * @return true if they are different + * \param s1 the first socket + * \param s2 the second socket + * \return true if they are different */ template <typename Address, typename Protocol> bool operator!=(const Socket<Address, Protocol> &s1, const Socket<Address, Protocol> &s2) @@ -1372,9 +1372,9 @@ /** * Compare two sockets. * - * @param s1 the first socket - * @param s2 the second socket - * @return true if s1 < s2 + * \param s1 the first socket + * \param s2 the second socket + * \return true if s1 < s2 */ template <typename Address, typename Protocol> bool operator<(const Socket<Address, Protocol> &s1, const Socket<Address, Protocol> &s2) @@ -1385,9 +1385,9 @@ /** * Compare two sockets. * - * @param s1 the first socket - * @param s2 the second socket - * @return true if s1 > s2 + * \param s1 the first socket + * \param s2 the second socket + * \return true if s1 > s2 */ template <typename Address, typename Protocol> bool operator>(const Socket<Address, Protocol> &s1, const Socket<Address, Protocol> &s2) @@ -1398,9 +1398,9 @@ /** * Compare two sockets. * - * @param s1 the first socket - * @param s2 the second socket - * @return true if s1 <= s2 + * \param s1 the first socket + * \param s2 the second socket + * \return true if s1 <= s2 */ template <typename Address, typename Protocol> bool operator<=(const Socket<Address, Protocol> &s1, const Socket<Address, Protocol> &s2) @@ -1411,9 +1411,9 @@ /** * Compare two sockets. * - * @param s1 the first socket - * @param s2 the second socket - * @return true if s1 >= s2 + * \param s1 the first socket + * \param s2 the second socket + * \return true if s1 >= s2 */ template <typename Address, typename Protocol> bool operator>=(const Socket<Address, Protocol> &s1, const Socket<Address, Protocol> &s2) @@ -1443,9 +1443,9 @@ /* {{{ Options for socket */ /** - * @class SockBlockMode - * @brief Set or get the blocking-mode for a socket. - * @warning On Windows, it's not possible to check if the socket is blocking or not. + * \class SockBlockMode + * \brief Set or get the blocking-mode for a socket. + * \warning On Windows, it's not possible to check if the socket is blocking or not. */ class SockBlockMode { public: @@ -1457,8 +1457,8 @@ /** * Set the option. * - * @param sc the socket - * @throw Error on errors + * \param sc the socket + * \throw Error on errors */ template <typename Address, typename Protocol> void set(Socket<Address, Protocol> &sc) const @@ -1491,8 +1491,8 @@ /** * Get the option. * - * @return the value - * @throw Error on errors + * \return the value + * \throw Error on errors */ template <typename Address, typename Protocol> bool get(Socket<Address, Protocol> &sc) const @@ -1512,8 +1512,8 @@ }; /** - * @class SockReuseAddress - * @brief Reuse address, must be used before calling Socket::bind + * \class SockReuseAddress + * \brief Reuse address, must be used before calling Socket::bind */ class SockReuseAddress { public: @@ -1525,8 +1525,8 @@ /** * Set the option. * - * @param sc the socket - * @throw Error on errors + * \param sc the socket + * \throw Error on errors */ template <typename Address, typename Protocol> inline void set(Socket<Address, Protocol> &sc) const @@ -1537,8 +1537,8 @@ /** * Get the option. * - * @return the value - * @throw Error on errors + * \return the value + * \throw Error on errors */ template <typename Address, typename Protocol> inline bool get(Socket<Address, Protocol> &sc) const @@ -1548,8 +1548,8 @@ }; /** - * @class SockSendBuffer - * @brief Set or get the output buffer. + * \class SockSendBuffer + * \brief Set or get the output buffer. */ class SockSendBuffer { public: @@ -1561,8 +1561,8 @@ /** * Set the option. * - * @param sc the socket - * @throw Error on errors + * \param sc the socket + * \throw Error on errors */ template <typename Address, typename Protocol> inline void set(Socket<Address, Protocol> &sc) const @@ -1573,8 +1573,8 @@ /** * Get the option. * - * @return the value - * @throw Error on errors + * \return the value + * \throw Error on errors */ template <typename Address, typename Protocol> inline int get(Socket<Address, Protocol> &sc) const @@ -1584,8 +1584,8 @@ }; /** - * @class SockReceiveBuffer - * @brief Set or get the input buffer. + * \class SockReceiveBuffer + * \brief Set or get the input buffer. */ class SockReceiveBuffer { public: @@ -1597,8 +1597,8 @@ /** * Set the option. * - * @param sc the socket - * @throw Error on errors + * \param sc the socket + * \throw Error on errors */ template <typename Address, typename Protocol> inline void set(Socket<Address, Protocol> &sc) const @@ -1609,8 +1609,8 @@ /** * Get the option. * - * @return the value - * @throw Error on errors + * \return the value + * \throw Error on errors */ template <typename Address, typename Protocol> inline int get(Socket<Address, Protocol> &sc) const @@ -1622,8 +1622,8 @@ /* }}} */ /** - * @class TcpNoDelay - * @brief Set this option if you want to disable nagle's algorithm. + * \class TcpNoDelay + * \brief Set this option if you want to disable nagle's algorithm. */ class TcpNoDelay { public: @@ -1635,8 +1635,8 @@ /** * Set the option. * - * @param sc the socket - * @throw Error on errors + * \param sc the socket + * \throw Error on errors */ template <typename Address, typename Protocol> inline void set(Socket<Address, Protocol> &sc) const @@ -1647,8 +1647,8 @@ /** * Get the option. * - * @return the value - * @throw Error on errors + * \return the value + * \throw Error on errors */ template <typename Address, typename Protocol> inline bool get(Socket<Address, Protocol> &sc) const @@ -1658,8 +1658,8 @@ }; /** - * @class Ipv6Only - * @brief Control IPPROTO_IPV6/IPV6_V6ONLY + * \class Ipv6Only + * \brief Control IPPROTO_IPV6/IPV6_V6ONLY * * Note: some systems may or not set this option by default so it's a good idea to set it in any case to either * false or true if portability is a concern. @@ -1674,8 +1674,8 @@ /** * Set the option. * - * @param sc the socket - * @throw Error on errors + * \param sc the socket + * \throw Error on errors */ template <typename Address, typename Protocol> inline void set(Socket<Address, Protocol> &sc) const @@ -1686,8 +1686,8 @@ /** * Get the option. * - * @return the value - * @throw Error on errors + * \return the value + * \throw Error on errors */ template <typename Address, typename Protocol> inline bool get(Socket<Address, Protocol> &sc) const @@ -1716,14 +1716,14 @@ namespace address { /** - * @class Ip - * @brief Base class for IPv6 and IPv4, you can use it if you don't know in advance if you'll use IPv6 or IPv4. + * \class Ip + * \brief Base class for IPv6 and IPv4, you can use it if you don't know in advance if you'll use IPv6 or IPv4. */ class Ip { public: /** - * @enum Type - * @brief Type of ip address. + * \enum Type + * \brief Type of ip address. */ enum Type { v4 = AF_INET, //!< AF_INET @@ -1750,7 +1750,7 @@ /** * Set the default domain to use when using default Ip constructor. By default, AF_INET is used. * - * @pre domain must be Type::v4 or Type::v6 + * \pre domain must be Type::v4 or Type::v6 */ static inline void setDefault(Type domain) noexcept { @@ -1770,35 +1770,35 @@ /** * Default initialize the Ip domain. * - * @pre domain must be AF_INET or AF_INET6 only - * @param domain the domain (AF_INET or AF_INET6) + * \pre domain must be AF_INET or AF_INET6 only + * \param domain the domain (AF_INET or AF_INET6) */ Ip(Type domain) noexcept; /** * Construct an address suitable for bind() or connect(). * - * @pre domain must be Type::v4 or Type::v6 - * @param domain the domain (AF_INET or AF_INET6) - * @param host the host (* for any) - * @param port the port number - * @throw Error on errors + * \pre domain must be Type::v4 or Type::v6 + * \param domain the domain (AF_INET or AF_INET6) + * \param host the host (* for any) + * \param port the port number + * \throw Error on errors */ Ip(const std::string &host, int port, Type domain = v4); /** * Construct an address from a storage. * - * @pre storage's domain must be AF_INET or AF_INET6 only - * @param ss the storage - * @param length the length + * \pre storage's domain must be AF_INET or AF_INET6 only + * \param ss the storage + * \param length the length */ Ip(const sockaddr_storage *ss, socklen_t length) noexcept; /** * Get the domain (AF_INET or AF_INET6). * - * @return the domain + * \return the domain */ inline int domain() const noexcept { @@ -1808,7 +1808,7 @@ /** * Return the underlying address, either sockaddr_in6 or sockaddr_in. * - * @return the address + * \return the address */ inline const sockaddr *address() const noexcept { @@ -1822,7 +1822,7 @@ /** * Return the underlying address length. * - * @return the length + * \return the length */ inline socklen_t length() const noexcept { @@ -1832,7 +1832,7 @@ /** * Get the port. * - * @return the port + * \return the port */ inline int port() const noexcept { @@ -1847,8 +1847,8 @@ #if !defined(_WIN32) /** - * @class Local - * @brief unix family sockets + * \class Local + * \brief unix family sockets * * Create an address to a specific path. Only available on Unix. */ @@ -1861,7 +1861,7 @@ /** * Get the domain AF_LOCAL. * - * @return AF_LOCAL + * \return AF_LOCAL */ inline int domain() const noexcept { @@ -1876,24 +1876,24 @@ /** * Construct an address to a path. * - * @param path the path - * @param rm remove the file before (default: false) + * \param path the path + * \param rm remove the file before (default: false) */ Local(std::string path, bool rm = false) noexcept; /** * Construct an unix address from a storage address. * - * @pre storage's domain must be AF_LOCAL - * @param ss the storage - * @param length the length + * \pre storage's domain must be AF_LOCAL + * \param ss the storage + * \param length the length */ Local(const sockaddr_storage *ss, socklen_t length) noexcept; /** * Get the sockaddr_un. * - * @return the address + * \return the address */ inline const sockaddr *address() const noexcept { @@ -1903,7 +1903,7 @@ /** * Get the address length. * - * @return the length + * \return the length */ inline socklen_t length() const noexcept { @@ -1940,8 +1940,8 @@ /* {{{ Tcp */ /** - * @class Tcp - * @brief Clear TCP implementation. + * \class Tcp + * \brief Clear TCP implementation. * * This is the basic TCP protocol that implements recv, send, connect and accept as wrappers of the usual * C functions. @@ -1951,7 +1951,7 @@ /** * Socket type. * - * @return SOCK_STREAM + * \return SOCK_STREAM */ inline int type() const noexcept { @@ -1985,11 +1985,11 @@ * that case state is either set to State::Connected or State::Disconnected but action and condition are * not set. * - * @param sc the socket - * @param address the address - * @param length the length - * @throw net::Error on errors - * @note Wrapper of connect(2) + * \param sc the socket + * \param address the address + * \param length the length + * \throw net::Error on errors + * \note Wrapper of connect(2) */ template <typename Address, typename Protocol> void connect(Socket<Address, Protocol> &sc, const sockaddr *address, socklen_t length) @@ -2034,8 +2034,8 @@ * If the connection is complete, status is set to State::Connected, otherwise it is set to * State::Disconnected. In both cases, action and condition are not set. * - * @param sc the socket - * @throw net::Error on errors + * \param sc the socket + * \throw net::Error on errors */ template <typename Address, typename Protocol> void connect(Socket<Address, Protocol> &sc) @@ -2064,12 +2064,12 @@ * * In any case, action and condition of this socket are not set. * - * @param sc the socket - * @param address the address destination - * @param length the address length - * @return the socket - * @throw net::Error on errors - * @note Wrapper of accept(2) + * \param sc the socket + * \param address the address destination + * \param length the address length + * \return the socket + * \throw net::Error on errors + * \note Wrapper of accept(2) */ template <typename Address, typename Protocol> Socket<Address, Protocol> accept(Socket<Address, Protocol> &sc, sockaddr *address, socklen_t *length) @@ -2105,12 +2105,12 @@ * * In any case, action is never set. * - * @param sc the socket - * @param data the destination - * @param length the destination length - * @return the number of bytes read - * @throw Error on errors - * @note Wrapper of recv(2) + * \param sc the socket + * \param data the destination + * \param length the destination length + * \return the number of bytes read + * \throw Error on errors + * \note Wrapper of recv(2) */ template <typename Address> unsigned recv(Socket<Address, Tcp> &sc, void *data, unsigned length) @@ -2153,12 +2153,12 @@ * * On any other errors, this function throw net::Error. * - * @param sc the socket - * @param data the buffer to send - * @param length the buffer length - * @return the number of bytes sent - * @throw net::Error on errors - * @note Wrapper of send(2) + * \param sc the socket + * \param data the buffer to send + * \param length the buffer length + * \return the number of bytes sent + * \throw net::Error on errors + * \note Wrapper of send(2) */ template <typename Address> unsigned send(Socket<Address, Tcp> &sc, const void *data, unsigned length) @@ -2196,8 +2196,8 @@ /* {{{ Udp */ /** - * @class Udp - * @brief Clear UDP type. + * \class Udp + * \brief Clear UDP type. * * This class is the basic implementation of UDP sockets. */ @@ -2206,7 +2206,7 @@ /** * Socket type. * - * @return SOCK_DGRAM + * \return SOCK_DGRAM */ inline int type() const noexcept { @@ -2230,13 +2230,13 @@ * * If the socket is blocking, this functions blocks until some data is available or if an error occurs. * - * @param sc the socket - * @param data the destination buffer - * @param length the buffer length - * @param address the address - * @param addrlen the initial address length - * @return the number of bytes received - * @throw Error on error + * \param sc the socket + * \param data the destination buffer + * \param length the buffer length + * \param address the address + * \param addrlen the initial address length + * \return the number of bytes received + * \throw Error on error */ template <typename Address> unsigned recvfrom(Socket<Address, Udp> &sc, void *data, unsigned length, sockaddr *address, socklen_t *addrlen) @@ -2276,13 +2276,13 @@ * * If the socket is blocking, this functions blocks until the data has been sent. * - * @param sc the socket - * @param data the buffer - * @param length the buffer length - * @param address the client address - * @param addrlen the adderss length - * @return the number of bytes sent - * @throw Error on error + * \param sc the socket + * \param data the buffer + * \param length the buffer length + * \param address the client address + * \param addrlen the adderss length + * \return the number of bytes sent + * \throw Error on error */ template <typename Address> unsigned sendto(Socket<Address, Udp> &sc, const void *data, unsigned length, const sockaddr *address, socklen_t addrlen) @@ -2321,17 +2321,17 @@ #if !defined(SOCKET_NO_SSL) /** - * @class Tls - * @brief OpenSSL secure layer for TCP. + * \class Tls + * \brief OpenSSL secure layer for TCP. * * **Note:** This protocol is much more difficult to use with non-blocking sockets, if some operations would block, the * user is responsible of calling the function again by waiting for the appropriate condition. See the functions for * more details. * - * @see Tls::accept - * @see Tls::connect - * @see Tls::recv - * @see Tls::send + * \see Tls::accept + * \see Tls::connect + * \see Tls::recv + * \see Tls::send */ class Tls : private Tcp { private: @@ -2436,7 +2436,7 @@ public: /** - * @copydoc Tcp::type + * \copydoc Tcp::type */ inline int type() const noexcept { @@ -2456,8 +2456,8 @@ /** * Set the method. * - * @param method the method - * @pre the socket must not be already created + * \param method the method + * \pre the socket must not be already created */ inline void setMethod(ssl::Method method) noexcept { @@ -2470,7 +2470,7 @@ /** * Use the specified private key file. * - * @param file the path to the private key + * \param file the path to the private key */ inline void setPrivateKey(std::string file) noexcept { @@ -2480,7 +2480,7 @@ /** * Use the specified certificate file. * - * @param file the path to the file + * \param file the path to the file */ inline void setCertificate(std::string file) noexcept { @@ -2490,7 +2490,7 @@ /** * Set to true if we must verify the certificate and private key. * - * @param verify the mode + * \param verify the mode */ inline void setVerify(bool verify = true) noexcept { @@ -2500,8 +2500,8 @@ /** * Initialize the SSL objects after have created. * - * @param sc the socket - * @throw net::Error on errors + * \param sc the socket + * \throw net::Error on errors */ template <typename Address> inline void create(Socket<Address, Tls> &sc) @@ -2536,10 +2536,10 @@ * * If the connection was completed correctly the state is set to State::Connected. * - * @param sc the socket - * @param address the address - * @param length the address length - * @throw net::Error on errors + * \param sc the socket + * \param address the address + * \param length the address length + * \throw net::Error on errors */ template <typename Address, typename Protocol> void connect(Socket<Address, Protocol> &sc, const sockaddr *address, socklen_t length) @@ -2560,8 +2560,8 @@ * This function must be called when the socket is ready for reading or writing (check with Socket::condition), * the state may change exactly like the initial connect call. * - * @param sc the socket - * @throw net::Error on errors + * \param sc the socket + * \throw net::Error on errors */ template <typename Address, typename Protocol> void connect(Socket<Address, Protocol> &sc) @@ -2589,11 +2589,11 @@ * * If the client is accepted correctly, its state is set to State::Accepted. This instance does not change. * - * @param sc the socket - * @param address the address destination - * @param length the address length - * @return the client - * @throw net::Error on errors + * \param sc the socket + * \param address the address destination + * \param length the address length + * \return the client + * \throw net::Error on errors */ template <typename Address> Socket<Address, Tls> accept(Socket<Address, Tls> &sc, sockaddr *address, socklen_t *length) @@ -2621,8 +2621,8 @@ * * Like accept or connect, user is responsible of calling this function until the connection is complete. * - * @param sc the socket - * @throw net::Error on errors + * \param sc the socket + * \throw net::Error on errors */ template <typename Address, typename Protocol> inline void accept(Socket<Address, Protocol> &sc) @@ -2638,11 +2638,11 @@ * is set to Condition::Readable or Condition::Writable. The user must wait that the condition is met and * call this function again. * - * @param sc the socket - * @param data the destination - * @param len the buffer length - * @return the number of bytes read - * @throw net::Error on errors + * \param sc the socket + * \param data the destination + * \param len the buffer length + * \return the number of bytes read + * \throw net::Error on errors */ template <typename Address> unsigned recv(Socket<Address, Tls> &sc, void *data, unsigned len) @@ -2669,11 +2669,11 @@ * Like recv, if the socket is marked non-blocking and no data can be sent or a negociation is required, * condition and action are set. See receive for more details * - * @param sc the socket - * @param data the data to send - * @param len the buffer length - * @return the number of bytes sent - * @throw net::Error on errors + * \param sc the socket + * \param data the data to send + * \param len the buffer length + * \return the number of bytes sent + * \throw net::Error on errors */ template <typename Address> unsigned send(Socket<Address, Tls> &sc, const void *data, unsigned len) @@ -2772,8 +2772,8 @@ /* {{{ Listener */ /** - * @class ListenerStatus - * @brief Result of polling + * \class ListenerStatus + * \brief Result of polling * * Result of a select call, returns the first ready socket found with its * flags. @@ -2791,8 +2791,8 @@ using ListenerTable = std::map<Handle, Condition>; /** - * @class Select - * @brief Implements select(2) + * \class Select + * \brief Implements select(2) * * This class is the fallback of any other method, it is not preferred at all for many reasons. */ @@ -2825,8 +2825,8 @@ #if defined(SOCKET_HAVE_POLL) /** - * @class Poll - * @brief Implements poll(2). + * \class Poll + * \brief Implements poll(2). * * Poll is widely supported and is better than select(2). It is still not the * best option as selecting the sockets is O(n). @@ -2868,8 +2868,8 @@ #if defined(SOCKET_HAVE_EPOLL) /** - * @class Epoll - * @brief Linux's epoll. + * \class Epoll + * \brief Linux's epoll. */ class Epoll { private: @@ -2925,8 +2925,8 @@ #if defined(SOCKET_HAVE_KQUEUE) /** - * @class Kqueue - * @brief Implements kqueue(2). + * \class Kqueue + * \brief Implements kqueue(2). * * This implementation is available on all BSD and Mac OS X. It is better than * poll(2) because it's O(1), however it's a bit more memory consuming. @@ -2981,8 +2981,8 @@ #endif /** - * @class Listener - * @brief Synchronous multiplexing + * \class Listener + * \brief Synchronous multiplexing * * Convenient wrapper around the select() system call. * @@ -2999,9 +2999,9 @@ * * ### Set * - * @code + * \code * void set(const ListenerTable &, Handle sc, Condition condition, bool add); - * @endcode + * \endcode * * This function, takes the socket to be added and the flags. The condition is * always guaranteed to be correct and the function will never be called twice @@ -3013,9 +3013,9 @@ * * ### Unset * - * @code + * \code * void unset(const ListenerTable &, Handle sc, Condition condition, bool remove); - * @endcode + * \endcode * * Like set, this function is only called if the condition is actually set and will * not be called multiple times. @@ -3025,18 +3025,18 @@ * * ### Wait * - * @code + * \code * std::vector<ListenerStatus> wait(const ListenerTable &, int ms); - * @endcode + * \endcode * * Wait for the sockets to be ready with the specified milliseconds. Must return a list of ListenerStatus, * may throw any exceptions. * * ### Name * - * @code + * \code * inline const char *name() const noexcept - * @endcode + * \endcode * * Returns the backend name. Usually the class in lower case. */ @@ -3055,7 +3055,7 @@ /** * Get the backend. * - * @return the backend + * \return the backend */ inline const Backend &backend() const noexcept { @@ -3065,7 +3065,7 @@ /** * Get the non-modifiable table. * - * @return the table + * \return the table */ inline const ListenerTable &table() const noexcept { @@ -3075,7 +3075,7 @@ /** * Overloaded function. * - * @return the iterator + * \return the iterator */ inline ListenerTable::const_iterator begin() const noexcept { @@ -3085,7 +3085,7 @@ /** * Overloaded function. * - * @return the iterator + * \return the iterator */ inline ListenerTable::const_iterator cbegin() const noexcept { @@ -3095,7 +3095,7 @@ /** * Overloaded function. * - * @return the iterator + * \return the iterator */ inline ListenerTable::const_iterator end() const noexcept { @@ -3105,7 +3105,7 @@ /** * Overloaded function. * - * @return the iterator + * \return the iterator */ inline ListenerTable::const_iterator cend() const noexcept { @@ -3120,9 +3120,9 @@ * * If incorrect flags are passed, the function does nothing. * - * @param sc the socket - * @param condition the condition (may be OR'ed) - * @throw Error if the backend failed to set + * \param sc the socket + * \param condition the condition (may be OR'ed) + * \throw Error if the backend failed to set */ void set(Handle sc, Condition condition) { @@ -3165,9 +3165,9 @@ * For example, if you added a socket for both reading and writing, * unsetting the write flags will keep the socket for reading. * - * @param sc the socket - * @param condition the condition (may be OR'ed) - * @see remove + * \param sc the socket + * \param condition the condition (may be OR'ed) + * \see remove */ void unset(Handle sc, Condition condition) { @@ -3209,7 +3209,7 @@ * * It is a shorthand for unset(sc, Condition::Readable | Condition::Writable); * - * @param sc the socket + * \param sc the socket */ inline void remove(Handle sc) { @@ -3237,8 +3237,8 @@ /** * Select a socket. Waits for a specific amount of time specified as the duration. * - * @param duration the duration - * @return the socket ready + * \param duration the duration + * \return the socket ready */ template <typename Rep, typename Ratio> inline ListenerStatus wait(const std::chrono::duration<Rep, Ratio> &duration) @@ -3253,8 +3253,8 @@ /** * Overload with milliseconds. * - * @param timeout the optional timeout in milliseconds - * @return the socket ready + * \param timeout the optional timeout in milliseconds + * \return the socket ready */ inline ListenerStatus wait(int timeout = -1) { @@ -3264,8 +3264,8 @@ /** * Select multiple sockets. * - * @param duration the duration - * @return the socket ready + * \param duration the duration + * \return the socket ready */ template <typename Rep, typename Ratio> inline std::vector<ListenerStatus> waitMultiple(const std::chrono::duration<Rep, Ratio> &duration) @@ -3280,7 +3280,7 @@ /** * Overload with milliseconds. * - * @return the socket ready + * \return the socket ready */ inline std::vector<ListenerStatus> waitMultiple(int timeout = -1) { @@ -3300,8 +3300,8 @@ /* {{{ Callback */ /** - * @class Callback - * @brief Convenient signal owner that checks if the target is valid. + * \class Callback + * \brief Convenient signal owner that checks if the target is valid. * * This class also catch all errors thrown from signals to avoid interfering with our process. */ @@ -3339,8 +3339,8 @@ /* {{{ StreamConnection */ /** - * @class StreamConnection - * @brief Connected client on the server side. + * \class StreamConnection + * \brief Connected client on the server side. * * This object is created from StreamServer when a new client is connected, it is the higher * level object of sockets and completely asynchronous. @@ -3365,7 +3365,7 @@ /** * Create the connection. * - * @param s the socket + * \param s the socket */ StreamConnection(Socket<Address, Protocol> s) : m_socket{std::move(s)} @@ -3376,8 +3376,8 @@ /** * Access the underlying socket. * - * @return the socket - * @warning use with care + * \return the socket + * \warning use with care */ inline Socket<Address, Protocol> &socket() noexcept { @@ -3387,7 +3387,7 @@ /** * Access the current output. * - * @return the output + * \return the output */ inline const std::string &output() const noexcept { @@ -3397,8 +3397,8 @@ /** * Overloaded function * - * @return the output - * @warning use with care, avoid modifying the output if you don't know what you're doing + * \return the output + * \warning use with care, avoid modifying the output if you don't know what you're doing */ inline std::string &output() noexcept { @@ -3408,7 +3408,7 @@ /** * Post some data to be sent asynchronously. * - * @param str the data to append + * \param str the data to append */ inline void send(std::string str) { @@ -3428,8 +3428,8 @@ * Set the write handler, the signal is emitted when the output has changed so that the StreamServer owner * knows that there are some data to send. * - * @param handler the handler - * @warning you usually never need to set this yourself + * \param handler the handler + * \warning you usually never need to set this yourself */ inline void setWriteHandler(WriteHandler handler) { @@ -3449,8 +3449,8 @@ /* {{{ StreamServer */ /** - * @class StreamServer - * @brief Convenient stream server for TCP and TLS. + * \class StreamServer + * \brief Convenient stream server for TCP and TLS. * * This class does all the things for you as accepting new clients, listening for it and sending data. It works * asynchronously without blocking to let you control your process workflow. @@ -3665,10 +3665,10 @@ /** * Create a stream server with the specified address to bind. * - * @param protocol the protocol (Tcp or Tls) - * @param address the address to bind - * @param max the max number to listen - * @throw Error on errors + * \param protocol the protocol (Tcp or Tls) + * \param address the address to bind + * \param max the max number to listen + * \throw Error on errors */ StreamServer(Protocol protocol, const Address &address, int max = 128) : m_master{std::move(protocol), address} @@ -3683,7 +3683,7 @@ /** * Set the connection handler, called when a new client is connected. * - * @param handler the handler + * \param handler the handler */ inline void setConnectionHandler(ConnectionHandler handler) { @@ -3693,7 +3693,7 @@ /** * Set the disconnection handler, called when a client died. * - * @param handler the handler + * \param handler the handler */ inline void setDisconnectionHandler(DisconnectionHandler handler) { @@ -3703,7 +3703,7 @@ /** * Set the receive handler, called when a client has sent something. * - * @param handler the handler + * \param handler the handler */ inline void setReadHandler(ReadHandler handler) { @@ -3713,7 +3713,7 @@ /** * Set the writing handler, called when some data has been sent to a client. * - * @param handler the handler + * \param handler the handler */ inline void setWriteHandler(WriteHandler handler) { @@ -3723,7 +3723,7 @@ /** * Set the error handler, called when unrecoverable error has occured. * - * @param handler the handler + * \param handler the handler */ inline void setErrorHandler(ErrorHandler handler) { @@ -3733,7 +3733,7 @@ /** * Set the timeout handler, called when the selection has timeout. * - * @param handler the handler + * \param handler the handler */ inline void setTimeoutHandler(TimeoutHandler handler) { @@ -3743,8 +3743,8 @@ /** * Poll for the next event. * - * @param timeout the timeout (-1 for indefinitely) - * @throw Error on errors + * \param timeout the timeout (-1 for indefinitely) + * \throw Error on errors */ void poll(int timeout = -1) { @@ -3784,8 +3784,8 @@ /* {{{ StreamClient */ /** - * @class StreamClient - * @brief Client side connection to a server. + * \class StreamClient + * \brief Client side connection to a server. * * This class is not thread safe and you must not call any of the functions from different threads. */ @@ -3951,9 +3951,9 @@ /** * Create a client. The client is automatically marked as non-blocking. * - * @param protocol the protocol (Tcp or Tls) - * @param address the optional address - * @throw net::Error on failures + * \param protocol the protocol (Tcp or Tls) + * \param address the optional address + * \throw net::Error on failures */ StreamClient(Protocol protocol = {}, const Address &address = {}) : m_socket{std::move(protocol), address} @@ -3965,7 +3965,7 @@ /** * Set the connection handler, called when the connection succeed. * - * @param handler the handler + * \param handler the handler */ inline void setConnectionHandler(ConnectionHandler handler) { @@ -3975,7 +3975,7 @@ /** * Set the disconnection handler, called when the server closed the connection. * - * @param handler the handler + * \param handler the handler */ inline void setDisconnectionHandler(DisconnectionHandler handler) { @@ -3985,7 +3985,7 @@ /** * Set the read handler, called when we received something. * - * @param handler the handler + * \param handler the handler */ inline void setReadHandler(ReadHandler handler) { @@ -3995,7 +3995,7 @@ /** * Set the write handler, called when we successfully sent data. * - * @param handler the handler + * \param handler the handler */ inline void setWriteHandler(WriteHandler handler) { @@ -4005,7 +4005,7 @@ /** * Set the error handler, called when unexpected error occurs. * - * @param handler the handler + * \param handler the handler */ inline void setErrorHandler(ErrorHandler handler) { @@ -4016,7 +4016,7 @@ * Connect to a server, this function may connect immediately or not in any case the connection handler * will be called when the connection completed. * - * @param address the address to connect to + * \param address the address to connect to */ void connect(const Address &address) noexcept { @@ -4028,7 +4028,7 @@ /** * Asynchronously send data to the server. * - * @param str the data to append + * \param str the data to append */ void send(std::string str) { @@ -4043,8 +4043,8 @@ /** * Wait for the next event. * - * @param timeout the time to wait in milliseconds - * @throw Error on errors + * \param timeout the time to wait in milliseconds + * \throw Error on errors */ void poll(int timeout = -1) noexcept {
--- a/lib/irccd/system.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/system.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_SYSTEM_HPP /** - * @file system.hpp - * @brief System dependant functions + * \file system.hpp + * \brief System dependant functions */ #include <irccd/sysconfig.hpp> @@ -36,35 +36,35 @@ /** * Set the program name, needed for some functions or some systems. * - * @param name the program name + * \param name the program name */ void setProgramName(std::string name) noexcept; /** * Get the program name. * - * @return the program name + * \return the program name */ const std::string &programName() noexcept; /** * Get the system name. * - * @return the name + * \return the name */ std::string name(); /** * Get the system version. * - * @return the version + * \return the version */ std::string version(); /** * Get the number of seconds elapsed since the boottime. * - * @return the number of seconds + * \return the number of seconds */ uint64_t uptime(); @@ -72,21 +72,21 @@ * Get the milliseconds elapsed since the application * startup. * - * @return the milliseconds + * \return the milliseconds */ uint64_t ticks(); /** * Get an environment variable. * - * @return the value or empty string + * \return the value or empty string */ std::string env(const std::string &var); /** * Get home directory usually /home/foo * - * @return the home directory + * \return the home directory */ std::string home(); @@ -95,7 +95,7 @@ /** * Set the effective uid by name or numeric value. * - * @param value the value + * \param value the value */ void setUid(const std::string &value); @@ -106,7 +106,7 @@ /** * Set the effective gid by name or numeric value. * - * @param value the value + * \param value the value */ void setGid(const std::string &value);
--- a/lib/irccd/timer.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/timer.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_TIMER_HPP /** - * @file timer.hpp - * @brief Provides interval based timers for JavaScript + * \file timer.hpp + * \brief Provides interval based timers for JavaScript */ #include <atomic> @@ -35,8 +35,8 @@ namespace irccd { /** - * @enum TimerType - * @brief Type of timer + * \enum TimerType + * \brief Type of timer */ enum class TimerType { Single, //!< The timer ends after execution @@ -44,8 +44,8 @@ }; /** - * @class Timer - * @brief Timer class + * \class Timer + * \brief Timer class * * A timer is a thread object that emits a signal periodically or just one time. It is perfectly pausable and resumable * to reuse the same object. @@ -98,40 +98,40 @@ * * The timer is not started, use start(). * - * @param type the timer type - * @param delay the delay in milliseconds - * @post isRunning() returns false + * \param type the timer type + * \param delay the delay in milliseconds + * \post isRunning() returns false */ Timer(TimerType type, unsigned delay) noexcept; /** * Destructor, closes the thread. * - * @pre stop() must have been called. + * \pre stop() must have been called. */ virtual ~Timer(); /** * Start the thread. * - * @pre isRunning() must return false - * @pre onSignal() must have been called - * @pre onEnd() must have been called - * @note Thread-safe + * \pre isRunning() must return false + * \pre onSignal() must have been called + * \pre onEnd() must have been called + * \note Thread-safe */ void start(); /** * Stop the timer, may be used by the user to stop it. * - * @note Thread-safe + * \note Thread-safe */ void stop(); /** * Get the type of timer. * - * @return the type. + * \return the type. */ inline TimerType type() const noexcept { @@ -141,8 +141,8 @@ /** * Tells if the timer has still a running thread. * - * @return true if still alive - * @note Thread-safe + * \return true if still alive + * \note Thread-safe */ inline bool isRunning() const noexcept {
--- a/lib/irccd/transport-client.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/transport-client.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_TRANSPORT_CLIENT_HPP /** - * @file transport-client.hpp - * @brief Client connected to irccd + * \file transport-client.hpp + * \brief Client connected to irccd */ #include <functional> @@ -42,8 +42,8 @@ } // !json /** - * @class TransportClient - * @brief Client connected to irccd. + * \class TransportClient + * \brief Client connected to irccd. * * This class emits a warning upon clients request through onCommand signal. */ @@ -86,8 +86,8 @@ /** * Send or receive data, called after a select. * - * @param setinput the input fd_set - * @param setoutput the output fd_set + * \param setinput the input fd_set + * \param setoutput the output fd_set */ void sync(fd_set &setinput, fd_set &setoutput); @@ -95,15 +95,15 @@ /** * Notify the client that the command succeeded. * - * @param command the command name + * \param command the command name */ void ok(const std::string &command); /** * Send an error message to the client. * - * @param command the command name - * @param message the error message + * \param command the command name + * \param message the error message */ void error(const std::string &command, std::string message); #endif @@ -114,14 +114,14 @@ * This function appends "\r\n\r\n" after the message so you don't have * to do it manually. * - * @param message the message + * \param message the message */ void send(std::string message); /** * Tell if the client has data pending for output. * - * @return true if has pending data to write + * \return true if has pending data to write */ inline bool hasOutput() const noexcept { @@ -131,13 +131,13 @@ /** * Get the underlying socket handle. * - * @return the socket + * \return the socket */ virtual net::Handle handle() noexcept = 0; }; /** - * @brief Template class for Tcp and Ssl sockets + * \brief Template class for Tcp and Ssl sockets */ template <typename Address> class TransportClientBase : public TransportClient { @@ -152,7 +152,7 @@ /** * Create a client. * - * @param socket the socket + * \param socket the socket */ inline TransportClientBase(net::SocketTcp<Address> socket) : m_socket(std::move(socket)) @@ -160,7 +160,7 @@ } /** - * @copydoc TransportClient::handle + * \copydoc TransportClient::handle */ net::Handle handle() noexcept override {
--- a/lib/irccd/transport-server.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/transport-server.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_TRANSPORT_SERVER_HPP /** - * @file transport-server.hpp - * @brief Transports for irccd + * \file transport-server.hpp + * \brief Transports for irccd */ #include <memory> @@ -35,8 +35,8 @@ namespace irccd { /** - * @class TransportServer - * @brief Bring networking between irccd and irccdctl + * \class TransportServer + * \brief Bring networking between irccd and irccdctl * * This class contains a master sockets for listening to TCP connections, it is then processed by irccd. * @@ -71,21 +71,21 @@ /** * Retrieve the underlying socket handle. * - * @return the socket + * \return the socket */ virtual net::Handle handle() noexcept = 0; /** * Accept a new client depending on the domain. * - * @return the new client + * \return the new client */ virtual std::shared_ptr<TransportClient> accept() = 0; }; /** - * @class TransportServerIp - * @brief Base class for both IPv4 and IPv6 servers. + * \class TransportServerIp + * \brief Base class for both IPv4 and IPv6 servers. */ class TransportServerIp : public TransportServer { protected: @@ -95,21 +95,21 @@ /** * Create a IP transport, use IPv6 or IPv4 address. * - * @param domain AF_INET or AF_INET6 - * @param address the address or "*" for any - * @param port the port number - * @param ipv6only set to true to disable IPv4 - * @throw net::Error on failures + * \param domain AF_INET or AF_INET6 + * \param address the address or "*" for any + * \param port the port number + * \param ipv6only set to true to disable IPv4 + * \throw net::Error on failures */ TransportServerIp(int domain, const std::string &address, int port, bool ipv6only = true); /** - * @copydoc TransportServer::socket + * \copydoc TransportServer::socket */ net::Handle handle() noexcept override; /** - * @copydoc TransportServer::accept + * \copydoc TransportServer::accept */ std::shared_ptr<TransportClient> accept() override; }; @@ -117,8 +117,8 @@ #if !defined(IRCCD_SYSTEM_WINDOWS) /** - * @class TransportServerUnix - * @brief Implementation of transports for Unix sockets. + * \class TransportServerUnix + * \brief Implementation of transports for Unix sockets. */ class TransportServerUnix : public TransportServer { private: @@ -129,7 +129,7 @@ /** * Create a Unix transport. * - * @param path the path + * \param path the path */ TransportServerUnix(std::string path); @@ -139,12 +139,12 @@ ~TransportServerUnix(); /** - * @copydoc TransportServer::socket + * \copydoc TransportServer::socket */ net::Handle handle() noexcept override; /** - * @copydoc TransportServer::accept + * \copydoc TransportServer::accept */ std::shared_ptr<TransportClient> accept() override; };
--- a/lib/irccd/unicode.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/unicode.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_UNICODE_HPP /** - * @file unicode.hpp - * @brief UTF-8 to UTF-32 conversions + * \file unicode.hpp + * \brief UTF-8 to UTF-32 conversions */ #include <stdexcept> @@ -41,25 +41,25 @@ * This can be used to iterate a valid UTF-8 string to jump to the next * real character. * - * @param c the first multi byte character - * @return the number of bytes [1-4] + * \param c the first multi byte character + * \return the number of bytes [1-4] */ int nbytesUtf8(char c) noexcept; /** * Get the number of bytes for the unicode point. * - * @param point the unicode point - * @return the number of bytes [1-4] or -1 on invalid + * \param point the unicode point + * \return the number of bytes [1-4] or -1 on invalid */ int nbytesPoint(char32_t point) noexcept; /** * Get real number of character in a string. * - * @param str the string - * @return the length - * @throw std::invalid_argument on invalid sequence + * \param str the string + * \return the length + * \throw std::invalid_argument on invalid sequence */ int length(const std::string &str); @@ -69,8 +69,8 @@ * The function must have the following signature: * void f(char ch) * - * @param str the UTF-8 string - * @throw std::invalid_argument on invalid sequence + * \param str the UTF-8 string + * \throw std::invalid_argument on invalid sequence */ template <typename Func> void forEach(const std::string &str, Func function) @@ -93,98 +93,98 @@ /** * Convert a UTF-32 string to UTF-8 string. * - * @param array the UTF-32 string - * @return the UTF-8 string - * @throw std::invalid_argument on invalid sequence + * \param array the UTF-32 string + * \return the UTF-8 string + * \throw std::invalid_argument on invalid sequence */ std::string toUtf8(const std::u32string &array); /** * Convert a UTF-8 string to UTF-32 string. * - * @param str the UTF-8 string - * @return the UTF-32 string - * @throw std::invalid_argument on invalid sequence + * \param str the UTF-8 string + * \return the UTF-32 string + * \throw std::invalid_argument on invalid sequence */ std::u32string toUtf32(const std::string &str); /** * Check if the unicode character is space. * - * @param c the character - * @return true if space + * \param c the character + * \return true if space */ bool isspace(char32_t c) noexcept; /** * Check if the unicode character is digit. * - * @param c the character - * @return true if digit + * \param c the character + * \return true if digit */ bool isdigit(char32_t c) noexcept; /** * Check if the unicode character is alpha category. * - * @param c the character - * @return true if alpha + * \param c the character + * \return true if alpha */ bool isalpha(char32_t c) noexcept; /** * Check if the unicode character is upper case. * - * @param c the character - * @return true if upper case + * \param c the character + * \return true if upper case */ bool isupper(char32_t c) noexcept; /** * Check if the unicode character is lower case. * - * @param c the character - * @return true if lower case + * \param c the character + * \return true if lower case */ bool islower(char32_t c) noexcept; /** * Check if the unicode character is title case. * - * @param c the character - * @return true if title case + * \param c the character + * \return true if title case */ bool istitle(char32_t c) noexcept; /** * Convert to upper case. * - * @param c the character - * @return the upper case character + * \param c the character + * \return the upper case character */ char32_t toupper(char32_t c) noexcept; /** * Convert to lower case. * - * @param c the character - * @return the lower case character + * \param c the character + * \return the lower case character */ char32_t tolower(char32_t c) noexcept; /** * Convert to title case. * - * @param c the character - * @return the title case character + * \param c the character + * \return the title case character */ char32_t totitle(char32_t c) noexcept; /** * Convert the UTF-32 string to upper case. * - * @param str the str - * @return the upper case string + * \param str the str + * \return the upper case string */ inline std::u32string toupper(std::u32string str) { @@ -198,9 +198,9 @@ /** * Convert the UTF-8 string to upper case. * - * @param str the str - * @return the upper case string - * @warning very slow at the moment + * \param str the str + * \return the upper case string + * \warning very slow at the moment */ inline std::string toupper(const std::string &str) { @@ -210,8 +210,8 @@ /** * Convert the UTF-32 string to lower case. * - * @param str the str - * @return the lower case string + * \param str the str + * \return the lower case string */ inline std::u32string tolower(std::u32string str) { @@ -225,9 +225,9 @@ /** * Convert the UTF-8 string to lower case. * - * @param str the str - * @return the lower case string - * @warning very slow at the moment + * \param str the str + * \return the lower case string + * \warning very slow at the moment */ inline std::string tolower(const std::string &str) {
--- a/lib/irccd/util.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/util.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_UTIL_HPP /** - * @file util.hpp - * @brief Utilities. + * \file util.hpp + * \brief Utilities. */ #include <ctime> @@ -37,8 +37,8 @@ namespace util { /** - * @enum MessageType - * @brief Describe which type of message has been received + * \enum MessageType + * \brief Describe which type of message has been received * * On channels and queries, you may have a special command or a standard message depending on the * beginning of the message. @@ -51,13 +51,13 @@ }; /** - * @brief Combine the type of message and its content. + * \brief Combine the type of message and its content. */ using MessagePair = std::pair<std::string, MessageType>; /** - * @class Substitution - * @brief Used for format() function. + * \class Substitution + * \brief Used for format() function. */ class Substitution { public: @@ -122,27 +122,27 @@ /** * Remove leading and trailing spaces. * - * @param str the string - * @return the removed white spaces + * \param str the string + * \return the removed white spaces */ std::string strip(std::string str); /** * Split a string by delimiters. * - * @param list the string to split - * @param delimiters a list of delimiters - * @param max max number of split - * @return a list of string splitted + * \param list the string to split + * \param delimiters a list of delimiters + * \param max max number of split + * \return a list of string splitted */ std::vector<std::string> split(const std::string &list, const std::string &delimiters, int max = -1); /** * Join values by a separator and return a string. * - * @param first the first iterator - * @param last the last iterator - * @param delim the optional delimiter + * \param first the first iterator + * \param last the last iterator + * \param delim the optional delimiter */ template <typename InputIt, typename DelimType = char> std::string join(InputIt first, InputIt last, DelimType delim = ':') @@ -162,9 +162,9 @@ /** * Convenient overload. * - * @param list the initializer list - * @param delim the delimiter - * @return the string + * \param list the initializer list + * \param delim the delimiter + * \return the string */ template <typename T, typename DelimType = char> inline std::string join(std::initializer_list<T> list, DelimType delim = ':') @@ -175,10 +175,10 @@ /** * Parse IRC message and determine if it's a command or a simple message. * - * @param message the message line - * @param commandChar the command char (e.g '!') - * @param plugin the plugin name - * @return the pair + * \param message the message line + * \param commandChar the command char (e.g '!') + * \param plugin the plugin name + * \return the pair */ MessagePair parseMessage(std::string message, const std::string &commandChar, const std::string &plugin); @@ -186,8 +186,8 @@ * Server and identities must have strict names. This function can * be used to ensure that they are valid. * - * @param name the identifier name - * @return true if is valid + * \param name the identifier name + * \return true if is valid */ inline bool isIdentifierValid(const std::string &name) { @@ -197,34 +197,34 @@ /** * Check if the value is a boolean, 1, yes and true are accepted. * - * @param value the value - * @return true if is boolean - * @note this function is case-insensitive + * \param value the value + * \return true if is boolean + * \note this function is case-insensitive */ bool isBoolean(std::string value) noexcept; /** * Check if the string is an integer. * - * @param value the input - * @param base the optional base - * @return true if integer + * \param value the input + * \param base the optional base + * \return true if integer */ bool isInt(const std::string &value, int base = 10) noexcept; /** * Check if the string is real. * - * @param value the value - * @return true if real + * \param value the value + * \return true if real */ bool isReal(const std::string &value) noexcept; /** * Check if the string is a number. * - * @param value the value - * @return true if it is a number + * \param value the value + * \return true if it is a number */ inline bool isNumber(const std::string &value) noexcept { @@ -234,8 +234,8 @@ /** * Parse a network message from an input buffer and remove it from it. * - * @param input the buffer, will be updated - * @return the message or empty string if there is nothing + * \param input the buffer, will be updated + * \return the message or empty string if there is nothing */ std::string nextNetwork(std::string &input);
--- a/lib/irccd/xdg.hpp Wed Apr 20 19:45:00 2016 +0200 +++ b/lib/irccd/xdg.hpp Wed Apr 20 19:55:25 2016 +0200 @@ -20,8 +20,8 @@ #define IRCCD_XDG_H /** - * @file xdg.h - * @brief Read XDG standard specifications + * \file xdg.h + * \brief Read XDG standard specifications */ #include <vector> @@ -30,8 +30,8 @@ namespace irccd { /** - * @class Xdg - * @brief XDG specifications + * \class Xdg + * \brief XDG specifications * * Read and get XDG directories. This file contains exports thingies so it can * compiles successfully on Windows but its usage is discouraged. @@ -55,28 +55,28 @@ /** * Open an xdg instance and load directories. * - * @throw std::runtime_error on failures + * \throw std::runtime_error on failures */ Xdg(); /** * Get the config directory. ${XDG_CONFIG_HOME} or ${HOME}/.config * - * @return the config directory + * \return the config directory */ const std::string &configHome() const noexcept; /** * Get the data directory. ${XDG_DATA_HOME} or ${HOME}/.local/share * - * @return the data directory + * \return the data directory */ const std::string &dataHome() const noexcept; /** * Get the cache directory. ${XDG_CACHE_HOME} or ${HOME}/.cache * - * @return the cache directory + * \return the cache directory */ const std::string &cacheHome() const noexcept; @@ -87,22 +87,22 @@ * The XDG standard says that application should handle XDG_RUNTIME_DIR by * themselves. * - * @return the runtime directory - * @throw std::runtime_error on error + * \return the runtime directory + * \throw std::runtime_error on error */ const std::string &runtimeDir() const; /** * Get the standard config directories. ${XDG_CONFIG_DIRS} or { "/etc/xdg" } * - * @return the list of config directories + * \return the list of config directories */ const List &configDirs() const noexcept; /** * Get the data directories. ${XDG_DATA_DIRS} or { "/usr/local/share", "/usr/share" } * - * @return the list of data directories + * \return the list of data directories */ const List &dataDirs() const noexcept; };