Mercurial > malikania
changeset 32:81292e0651d2
Misc: switch to \ for doxygen, #479
line wrap: on
line diff
--- a/libclient/malikania/animation.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/animation.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,8 +20,8 @@ #define MALIKANIA_ANIMATION_H /** - * @file animation.h - * @brief Describe an animation. + * \file animation.h + * \brief Describe an animation. */ #include <cassert> @@ -37,8 +37,8 @@ class Window; /** - * @class AnimationFrame - * @brief Animation frame description. + * \class AnimationFrame + * \brief Animation frame description. * * A frame is a duration before switching to the next sprite cell. It is currently implemented as a class for future * usage. @@ -51,7 +51,7 @@ /** * Construct a frame. * - * @param delay the optional delay + * \param delay the optional delay */ inline AnimationFrame(std::uint16_t delay = 100) noexcept : m_delay(delay) @@ -61,7 +61,7 @@ /** * Get the the delay. * - * @return the delay + * \return the delay */ inline std::uint16_t delay() const noexcept { @@ -70,13 +70,13 @@ }; /** - * @brief List of frames. + * \brief List of frames. */ using AnimationFrames = std::vector<AnimationFrame>; /** - * @class Animation - * @brief Animation description. + * \class Animation + * \brief Animation description. * * An animation is a sprite with a set of frames containing a delay for showing all sprites in a specific amount of * time. @@ -85,7 +85,7 @@ * so the user is able to use the same animation on different parts of the screen without having to duplicate * resources. * - * @see Animator + * \see Animator */ class Animation : public duk::Bindable { private: @@ -96,8 +96,8 @@ /** * Create an animation. * - * @param sprite the sprite image - * @param frames the frames to show + * \param sprite the sprite image + * \param frames the frames to show */ inline Animation(Sprite sprite, AnimationFrames frames) noexcept : m_sprite(std::move(sprite)) @@ -108,7 +108,7 @@ /** * Get the underlying sprite. * - * @return the sprite + * \return the sprite */ inline const Sprite &sprite() const noexcept { @@ -118,7 +118,7 @@ /** * Overloaded function. * - * @return the sprite + * \return the sprite */ inline Sprite &sprite() noexcept { @@ -128,7 +128,7 @@ /** * Get the frames. * - * @return the frames + * \return the frames */ inline const AnimationFrames &frames() const noexcept { @@ -138,9 +138,9 @@ /** * Access a frame. * - * @pre index < number of frames - * @param index the index - * @return the frame + * \pre index < number of frames + * \param index the index + * \return the frame */ inline const AnimationFrame &operator[](unsigned index) const noexcept {
--- a/libclient/malikania/animator.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/animator.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,8 +20,8 @@ #define MALIKANIA_ANIMATOR_H /** - * @file animator.h - * @brief Draw animations. + * \file animator.h + * \brief Draw animations. */ #include "elapsed-timer.h" @@ -34,8 +34,8 @@ class Window; /** - * @class Animator - * @brief Object for drawing animations. + * \class Animator + * \brief Object for drawing animations. * * The animator contains an animation and a state. */ @@ -49,8 +49,8 @@ /** * Construct an animator. * - * @pre animation must not be null - * @param animation the animation + * \pre animation must not be null + * \param animation the animation */ Animator(Animation &animation) noexcept; @@ -64,8 +64,8 @@ /** * Draw the animation. * - * @param window the window - * @param position the position in the window + * \param window the window + * \param position the position in the window */ void draw(Window &window, const Point &position); };
--- a/libclient/malikania/client-resources-loader.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/client-resources-loader.h Fri Jun 17 13:07:05 2016 +0200 @@ -30,8 +30,8 @@ namespace malikania { /** - * @class ClientResourcesLoader - * @brief Load client resources. + * \class ClientResourcesLoader + * \brief Load client resources. */ class ClientResourcesLoader : public ResourcesLoader { protected: @@ -40,23 +40,23 @@ * * The size is an array of two integers (e.g. [ 1, 2 ]). * - * @pre object.isObject() - * @param id the resource id - * @param object the object - * @param property the property - * @return the size - * @throw std::runtime_error if the property is not a size + * \pre object.isObject() + * \param id the resource id + * \param object the object + * \param property the property + * \return the size + * \throw std::runtime_error if the property is not a size */ Size requireSize(const std::string &id, const json::Value &object, const std::string &property) const; /** * Get a size object or a default one if not present or invalid. * - * @pre object.isObject() - * @param id the resource id - * @param object the object - * @param property the property - * @return the size or default one + * \pre object.isObject() + * \param id the resource id + * \param object the object + * \param property the property + * \return the size or default one */ Size getSize(const std::string &id, const json::Value &object, const std::string &property) const noexcept; @@ -66,8 +66,8 @@ * * The window is required because some of the resources require it. * - * @param window the window - * @param locator the resources locator + * \param window the window + * \param locator the resources locator */ inline ClientResourcesLoader(ResourcesLocator &locator) : ResourcesLoader(locator) @@ -77,37 +77,37 @@ /** * Load a font. * - * @param id the resource id - * @param size the desired size - * @return the font - * @throw std::runtime_error on errors + * \param id the resource id + * \param size the desired size + * \return the font + * \throw std::runtime_error on errors */ virtual Font loadFont(const std::string &id, unsigned size); /** * Load an image. * - * @param id the resource id - * @return the image - * @throw std::runtime_error on errors + * \param id the resource id + * \return the image + * \throw std::runtime_error on errors */ virtual Image loadImage(const std::string &id); /** * Load a sprite. * - * @param id the resource id - * @return the sprite - * @throw std::runtime_error on errors + * \param id the resource id + * \return the sprite + * \throw std::runtime_error on errors */ virtual Sprite loadSprite(const std::string &id); /** * Load an animation. * - * @param id the resource id - * @return the animation - * @throw std::runtime_error on errors + * \param id the resource id + * \return the animation + * \throw std::runtime_error on errors */ virtual Animation loadAnimation(const std::string &id); };
--- a/libclient/malikania/color.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/color.h Fri Jun 17 13:07:05 2016 +0200 @@ -25,8 +25,8 @@ namespace malikania { /** - * @class Color - * @brief Color description + * \class Color + * \brief Color description */ class Color { private: @@ -44,10 +44,10 @@ /** * Constructor with all fields. * - * @param red the red value - * @param green the green value - * @param blue the blue value - * @param alpha the alpha value + * \param red the red value + * \param green the green value + * \param blue the blue value + * \param alpha the alpha value */ inline Color(std::uint8_t red, std::uint8_t green, std::uint8_t blue, std::uint8_t alpha) noexcept : m_red(red) @@ -60,7 +60,7 @@ /** * Constructor with an hexadecimal value. * - * @param hex the color + * \param hex the color */ inline Color(std::uint32_t hex) noexcept : m_red((hex >> 16) & 0xff) @@ -75,15 +75,15 @@ * * See the SVG this [list](http://www.december.com/html/spec/colorsvg.html) for supported names. * - * @param name the color name - * @throw std::invalid_argument if the color does not exist or is invalid + * \param name the color name + * \throw std::invalid_argument if the color does not exist or is invalid */ Color(const std::string &name); /** * Get the red value. * - * @return the value + * \return the value */ inline std::uint8_t red() const noexcept { @@ -93,7 +93,7 @@ /** * Get the green value. * - * @return the value + * \return the value */ inline std::uint8_t green() const noexcept { @@ -103,7 +103,7 @@ /** * Get the blue value. * - * @return the value + * \return the value */ inline std::uint8_t blue() const noexcept { @@ -113,7 +113,7 @@ /** * Get the alpha value. * - * @return the value + * \return the value */ inline std::uint8_t alpha() const noexcept {
--- a/libclient/malikania/font.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/font.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,8 +20,8 @@ #define MALIKANIA_FONT_H /** - * @file Font.h - * @brief Fonts. + * \file Font.h + * \brief Fonts. */ #include <memory> @@ -33,8 +33,8 @@ namespace malikania { /** - * @class Font - * @brief Font object. + * \class Font + * \brief Font object. */ class Font : public duk::Bindable { private: @@ -47,15 +47,15 @@ /** * Construct a font from binary data. * - * @param data the raw data - * @param size the size + * \param data the raw data + * \param size the size */ Font(std::string data, unsigned size); /** * Default move constructor. * - * @param other the other font + * \param other the other font */ Font(Font &&other) noexcept; @@ -67,7 +67,7 @@ /** * Get the font size. * - * @return the font size + * \return the font size */ inline unsigned size() const noexcept { @@ -77,7 +77,7 @@ /** * Get the underlying backend. * - * @return the backend + * \return the backend */ inline const Backend &backend() const noexcept { @@ -87,7 +87,7 @@ /** * Overloaded function. * - * @return the backend + * \return the backend */ inline Backend &backend() noexcept { @@ -97,16 +97,16 @@ /** * Get the clipping size required to draw the given text. * - * @param text the text to clip - * @return the required size + * \param text the text to clip + * \return the required size */ Size clip(const std::string &text) const; /** * Default move assignment operator. * - * @param other the other font - * @return this + * \param other the other font + * \return this */ Font &operator=(Font &&other) noexcept; };
--- a/libclient/malikania/image.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/image.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,8 +20,8 @@ #define MALIKANIA_IMAGE_H /** - * @file image.h - * @brief Images. + * \file image.h + * \brief Images. */ #include <memory> @@ -37,8 +37,8 @@ class Window; /** - * @class Image - * @brief Image object. + * \class Image + * \brief Image object. */ class Image : public duk::Bindable { private: @@ -50,15 +50,15 @@ /** * Construct an image from the binary data. * - * @param window the window - * @param data the data + * \param window the window + * \param data the data */ Image(std::string data); /** * Default move constructor. * - * @param other the other image + * \param other the other image */ Image(Image &&other) noexcept; @@ -70,7 +70,7 @@ /** * Overloaded function. * - * @return the backend + * \return the backend */ inline Backend &backend() noexcept { @@ -80,7 +80,7 @@ /** * Get the underlying backend. * - * @return the backend + * \return the backend */ inline const Backend &backend() const noexcept { @@ -90,32 +90,32 @@ /** * Get the image size. * - * @return the size + * \return the size */ const Size &size() const noexcept; /** * Draw the image to the window. * - * @param window the window - * @param position the position + * \param window the window + * \param position the position */ void draw(Window &window, const Point &position = {0, 0}); /** * Overloaded function. * - * @param window the window - * @param source the source to clip - * @param target the target destination + * \param window the window + * \param source the source to clip + * \param target the target destination */ void draw(Window &window, const Rectangle &source, const Rectangle &target); /** * Default move assignment operator. * - * @param other the other image - * @return this + * \param other the other image + * \return this */ Image &operator=(Image &&image) noexcept; };
--- a/libclient/malikania/js-color.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/js-color.h Fri Jun 17 13:07:05 2016 +0200 @@ -27,7 +27,7 @@ namespace duk { /** - * @brief JavaScript binding for Color. + * \brief JavaScript binding for Color. * * Colors can be created from plain JavaScript object. * @@ -50,8 +50,8 @@ * * May return a default value or a color with adjusted components. * - * @param ctx the context - * @param index the index + * \param ctx the context + * \param index the index */ static Color get(ContextPtr ctx, Index index); @@ -60,8 +60,8 @@ * * If the color has any invalid component, raise a JavaScript error. * - * @param ctx the context - * @param index the index + * \param ctx the context + * \param index the index */ static Color require(ContextPtr ctx, Index index); @@ -69,26 +69,26 @@ * Like get, but return the default value only if the value at the given index is not an object or not a string, * otherwise, adjust invalid values. * - * @param ctx the context - * @param index the index - * @param def the default value + * \param ctx the context + * \param index the index + * \param def the default value */ static Color optional(ContextPtr ctx, Index index, Color def); /** * Push the color as object. * - * @param ctx the context - * @param color the color + * \param ctx the context + * \param color the color */ static void push(ContextPtr ctx, const Color &color); /** * Put the color properties into the object at the top of the stack. * - * @pre the top value must be an object - * @param ctx the context - * @param color the color + * \pre the top value must be an object + * \param ctx the context + * \param color the color */ static void put(ContextPtr ctx, const Color &color); };
--- a/libclient/malikania/js-line.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/js-line.h Fri Jun 17 13:07:05 2016 +0200 @@ -27,7 +27,7 @@ namespace duk { /** - * @brief JavaScript binding for Line. + * \brief JavaScript binding for Line. * * Lines are plain objects. * @@ -46,9 +46,9 @@ /** * Get a line. * - * @param ctx the context - * @param index the index - * @return the line + * \param ctx the context + * \param index the index + * \return the line */ static Line get(ContextPtr ctx, Index index); @@ -57,35 +57,35 @@ * * If value is not an object or any property is invalid, raise a JavaScript error. * - * @param ctx the context - * @param index the index - * @return the line + * \param ctx the context + * \param index the index + * \return the line */ static Line require(ContextPtr ctx, Index index); /** * Like get but return def if the value at the given index is not an object. * - * @param ctx the context - * @param index the index - * @param def the default value - * @return the line + * \param ctx the context + * \param index the index + * \param def the default value + * \return the line */ static Line optional(ContextPtr ctx, Index index, Line def); /** * Push the line as object. * - * @param ctx the context - * @param line the line + * \param ctx the context + * \param line the line */ static void push(ContextPtr ctx, const Line &line); /** * Put the line properties into the object at the top of the stack. * - * @param ctx the context - * @param line the line + * \param ctx the context + * \param line the line */ static void put(ContextPtr ctx, const Line &line); };
--- a/libclient/malikania/js-rectangle.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/js-rectangle.h Fri Jun 17 13:07:05 2016 +0200 @@ -27,7 +27,7 @@ namespace duk { /** - * @brief JavaScript binding for Rectangle. + * \brief JavaScript binding for Rectangle. * * Rectangles are plain objects. * @@ -48,9 +48,9 @@ * * The rectangle may be adjusted if any values are incorrect. * - * @param ctx the context - * @param index the value index - * @return the rectangle + * \param ctx the context + * \param index the value index + * \return the rectangle */ static Rectangle get(ContextPtr ctx, Index index); @@ -59,9 +59,9 @@ * * If the object is not a rectangle or if width, height are invalid, raise a JavaScript error. * - * @param ctx the context - * @param index the index - * @return the rectangle + * \param ctx the context + * \param index the index + * \return the rectangle */ static Rectangle require(ContextPtr ctx, Index index); @@ -69,26 +69,26 @@ /** * Like get but return the default value if the value at the given index is not an object or invalid * - * @param ctx the context - * @param index the idnex - * @param def the default value - * @return the rectangle + * \param ctx the context + * \param index the idnex + * \param def the default value + * \return the rectangle */ static Rectangle optional(ContextPtr ctx, Index index, Rectangle def); /** * Push the rectangle as object. * - * @param ctx the context - * @param rect the rectangle + * \param ctx the context + * \param rect the rectangle */ static void push(ContextPtr ctx, const Rectangle &rect); /** * Put the rectangle properties into the object at the top of the stack. * - * @param ctx the context - * @param rect the rectangle + * \param ctx the context + * \param rect the rectangle */ static void put(ContextPtr ctx, const Rectangle &rect); };
--- a/libclient/malikania/js-size.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/js-size.h Fri Jun 17 13:07:05 2016 +0200 @@ -27,7 +27,7 @@ namespace duk { /** - * @brief JavaScript binding for Size. + * \brief JavaScript binding for Size. * * Size are plain objects. * @@ -46,9 +46,9 @@ * * The size may be adjusted if any values are incorrect. * - * @param ctx the context - * @param index the value index - * @return the size + * \param ctx the context + * \param index the value index + * \return the size */ static malikania::Size get(ContextPtr ctx, Index index); @@ -57,35 +57,35 @@ * * If the object is not a size, raise a JavaScript error. * - * @param ctx the context - * @param index the index - * @return the size + * \param ctx the context + * \param index the index + * \return the size */ static malikania::Size require(ContextPtr ctx, Index index); /** * Like get but return the default value if the value at the given index is not an object. * - * @param ctx the context - * @param index the idnex - * @param def the default value - * @return the size + * \param ctx the context + * \param index the idnex + * \param def the default value + * \return the size */ static malikania::Size optional(ContextPtr ctx, Index index, malikania::Size def); /** * Push the size as object. * - * @param ctx the context - * @param size the size + * \param ctx the context + * \param size the size */ static void push(ContextPtr ctx, const malikania::Size &size); /** * Put the size properties into the object at the top of the stack. * - * @param ctx the context - * @param size the size + * \param ctx the context + * \param size the size */ static void put(ContextPtr ctx, const malikania::Size &size); };
--- a/libclient/malikania/js-sprite.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/js-sprite.h Fri Jun 17 13:07:05 2016 +0200 @@ -27,7 +27,7 @@ namespace duk { /** - * @brief JavaScript binding for Sprite. + * \brief JavaScript binding for Sprite. */ template <> class TypeTraits<Sprite> { @@ -35,7 +35,7 @@ /** * Put the Sprite prototype to the top of the stack. * - * @param ctx the context + * \param ctx the context */ static void prototype(ContextPtr ctx) { @@ -51,7 +51,7 @@ /** * Get the object signature. * - * @return Sprite signature + * \return Sprite signature */ static inline std::string name() { @@ -61,7 +61,7 @@ /** * Get inheritance list. * - * @return empty + * \return empty */ static inline std::vector<std::string> inherits() {
--- a/libclient/malikania/js-window.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/js-window.h Fri Jun 17 13:07:05 2016 +0200 @@ -27,7 +27,7 @@ namespace duk { /** - * @brief JavaScript binding for Window. + * \brief JavaScript binding for Window. */ template <> class TypeTraits<Window> { @@ -35,7 +35,7 @@ /** * Put the Window prototype to the top of the stack. * - * @param ctx the context + * \param ctx the context */ static void prototype(duk::ContextPtr ctx) {
--- a/libclient/malikania/line.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/line.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,15 +20,15 @@ #define MALIKANIA_LINE_H /** - * @file line.h - * @brief Line description. + * \file line.h + * \brief Line description. */ namespace malikania { /** - * @class Line - * @brief Line description. + * \class Line + * \brief Line description. * * A line has an origin (x, y) and a destination (x, y). */ @@ -43,10 +43,10 @@ /** * Construct a line. * - * @param x1 the first x - * @param y1 the first y - * @param x2 the second x - * @param y2 the second y + * \param x1 the first x + * \param y1 the first y + * \param x2 the second x + * \param y2 the second y */ inline Line(int x1 = 0, int y1 = 0, int x2 = 0, int y2 = 0) noexcept : m_x1(x1) @@ -59,7 +59,7 @@ /** * Get the first x. * - * @return the x1 + * \return the x1 */ inline int x1() const noexcept { @@ -69,7 +69,7 @@ /** * Get the first y. * - * @return the y1 + * \return the y1 */ inline int y1() const noexcept { @@ -79,7 +79,7 @@ /** * Get the second x. * - * @return the x2 + * \return the x2 */ inline int x2() const noexcept { @@ -89,7 +89,7 @@ /** * Get the second y. * - * @return the y2 + * \return the y2 */ inline int y2() const noexcept { @@ -100,9 +100,9 @@ /** * Compare equality. * - * @param l1 the first line - * @param l2 the second line - * @return true if they equal + * \param l1 the first line + * \param l2 the second line + * \return true if they equal */ inline bool operator==(const Line &l1, const Line &l2) noexcept { @@ -112,9 +112,9 @@ /** * Compare equality. * - * @param l1 the first line - * @param l2 the second line - * @return false if they equal + * \param l1 the first line + * \param l2 the second line + * \return false if they equal */ inline bool operator!=(const Line &l1, const Line &l2) noexcept {
--- a/libclient/malikania/point.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/point.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,15 +20,15 @@ #define MALIKANIA_POINT_H /** - * @file point.h - * @brief Point description. + * \file point.h + * \brief Point description. */ namespace malikania { /** - * @class Point - * @brief Point coordinate. + * \class Point + * \brief Point coordinate. */ class Point { private: @@ -39,8 +39,8 @@ /** * Construct a point. * - * @param x the x - * @param y the y + * \param x the x + * \param y the y */ inline Point(int x = 0, int y = 0) noexcept : m_x(x) @@ -51,7 +51,7 @@ /** * Get the x position. * - * @return the x + * \return the x */ inline int x() const noexcept { @@ -61,7 +61,7 @@ /** * Get the y position. * - * @return the y + * \return the y */ inline int y() const noexcept { @@ -72,9 +72,9 @@ /** * Compare equality. * - * @param p1 the first point - * @param p2 the second point - * @return true if they equal + * \param p1 the first point + * \param p2 the second point + * \return true if they equal */ inline bool operator==(const Point &p1, const Point &p2) noexcept { @@ -84,9 +84,9 @@ /** * Compare equality. * - * @param p1 the first point - * @param p2 the second point - * @return false if they equal + * \param p1 the first point + * \param p2 the second point + * \return false if they equal */ inline bool operator!=(const Point &p1, const Point &p2) noexcept {
--- a/libclient/malikania/rectangle.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/rectangle.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,15 +20,15 @@ #define MALIKANIA_RECTANGLE_H /** - * @file rectangle.h - * @brief Rectangle description. + * \file rectangle.h + * \brief Rectangle description. */ namespace malikania { /** - * @class Rectangle - * @brief Rectangle description. + * \class Rectangle + * \brief Rectangle description. * * A rectangle has coordinates (x, y) and dimensions (width, height). * @@ -45,10 +45,10 @@ /** * Construct a rectangle. * - * @param x the x position - * @param y the y position - * @param width the width - * @param height the height + * \param x the x position + * \param y the y position + * \param width the width + * \param height the height */ inline Rectangle(int x = 0, int y = 0, unsigned width = 0, unsigned height = 0) noexcept : m_x(x) @@ -61,7 +61,7 @@ /** * Get the x position. * - * @return the x position + * \return the x position */ inline int x() const noexcept { @@ -71,7 +71,7 @@ /** * Get the y position. * - * @return the y position + * \return the y position */ inline int y() const noexcept { @@ -81,7 +81,7 @@ /** * Get the rectangle width. * - * @return the width + * \return the width */ inline unsigned width() const noexcept { @@ -91,7 +91,7 @@ /** * Get the rectangle height. * - * @return the height + * \return the height */ inline unsigned height() const noexcept { @@ -101,7 +101,7 @@ /** * Check if the rectangle has null dimensions. * - * @return true if weight and height are 0 + * \return true if weight and height are 0 */ inline bool isNull() const noexcept { @@ -112,9 +112,9 @@ /** * Compare equality. * - * @param r1 the first rectangle - * @param r2 the second rectangle - * @return true if they equal + * \param r1 the first rectangle + * \param r2 the second rectangle + * \return true if they equal */ inline bool operator==(const Rectangle &r1, const Rectangle &r2) noexcept { @@ -124,9 +124,9 @@ /** * Compare equality. * - * @param r1 the first rectangle - * @param r2 the second rectangle - * @return false if they equal + * \param r1 the first rectangle + * \param r2 the second rectangle + * \return false if they equal */ inline bool operator!=(const Rectangle &r1, const Rectangle &r2) noexcept {
--- a/libclient/malikania/size.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/size.h Fri Jun 17 13:07:05 2016 +0200 @@ -22,8 +22,8 @@ namespace malikania { /** - * @class Size - * @brief Size description. + * \class Size + * \brief Size description. */ class Size { private: @@ -34,8 +34,8 @@ /** * Constructor. * - * @param width the size width - * @param height the size height + * \param width the size width + * \param height the size height */ inline Size(unsigned width = 0, unsigned height = 0) noexcept : m_width(width) @@ -46,7 +46,7 @@ /** * Get the width. * - * @return the width + * \return the width */ inline unsigned width() const noexcept { @@ -56,7 +56,7 @@ /** * Get the height. * - * @return the height + * \return the height */ inline unsigned height() const noexcept { @@ -66,7 +66,7 @@ /** * Check if the size is 0, 0. * - * @return true if height and width are 0 + * \return true if height and width are 0 */ inline bool isNull() const noexcept { @@ -77,9 +77,9 @@ /** * Compare equality. * - * @param s1 the first size - * @param s2 the second size - * @return true if they equal + * \param s1 the first size + * \param s2 the second size + * \return true if they equal */ inline bool operator==(const Size &s1, const Size &s2) noexcept { @@ -89,9 +89,9 @@ /** * Compare equality. * - * @param s1 the first size - * @param s2 the second size - * @return false if they equal + * \param s1 the first size + * \param s2 the second size + * \return false if they equal */ inline bool operator!=(const Size &s1, const Size &s2) noexcept {
--- a/libclient/malikania/sprite.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/sprite.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,8 +20,8 @@ #define MALIKANIA_SPRITE_H /** - * @file sprite.h - * @brief Sprite description. + * \file sprite.h + * \brief Sprite description. */ #include <malikania/json.h> @@ -35,8 +35,8 @@ class Window; /** - * @class Sprite - * @brief A Sprite is an image divided into cells. + * \class Sprite + * \brief A Sprite is an image divided into cells. */ class Sprite : public duk::Bindable { private: @@ -52,19 +52,19 @@ /** * Construct a sprite. * - * @pre cell must not have height or width null - * @param image the image to use - * @param cell size of cell in the image - * @param margin the optional space from borders - * @param space the optional space between cells - * @param size the sprite size (if 0, taken from the image) + * \pre cell must not have height or width null + * \param image the image to use + * \param cell size of cell in the image + * \param margin the optional space from borders + * \param space the optional space between cells + * \param size the sprite size (if 0, taken from the image) */ Sprite(Image image, Size cell, Size margin = { 0, 0 }, Size space = { 0, 0 }, Size size = { 0, 0 }) noexcept; /** * Get the underlying image. * - * @return the image + * \return the image */ inline const Image &image() const noexcept { @@ -74,7 +74,7 @@ /** * Overloaded function. * - * @return the image + * \return the image */ inline Image &image() noexcept { @@ -84,7 +84,7 @@ /** * Get the cell size. * - * @return the cell size + * \return the cell size */ inline const Size &cell() const noexcept { @@ -94,7 +94,7 @@ /** * Get the margin size. * - * @return the margin size + * \return the margin size */ inline const Size &margin() noexcept { @@ -104,7 +104,7 @@ /** * Get the space size. * - * @return the space size + * \return the space size */ inline const Size &space() const noexcept { @@ -114,7 +114,7 @@ /** * Get the number of rows in the grid. * - * @return the number of rows + * \return the number of rows */ inline unsigned rows() const noexcept { @@ -124,7 +124,7 @@ /** * Get the number of columns in the grid. * - * @return the number of columns + * \return the number of columns */ inline unsigned columns() const noexcept { @@ -134,10 +134,10 @@ /** * Draw the sprite into the window at the specified position. * - * @pre cell < rows() * columns() - * @param window the window - * @param cell the cell index - * @param position the position in the window + * \pre cell < rows() * columns() + * \param window the window + * \param cell the cell index + * \param position the position in the window */ void draw(Window &window, unsigned cell, const Point &position); };
--- a/libclient/malikania/window.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libclient/malikania/window.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,8 +20,8 @@ #define MALIKANIA_WINDOW_H /** - * @file window.h - * @brief Window and drawing. + * \file window.h + * \brief Window and drawing. */ #include <functional> @@ -40,7 +40,7 @@ class Rectangle; /** - * @brief Main window class and drawing. + * \brief Main window class and drawing. */ class Window : public duk::Bindable { private: @@ -94,10 +94,10 @@ /** * Create a window. * - * @param width the initial width - * @param height the initial height - * @param title the optional title - * @throw std::runtime_error on errors + * \param width the initial width + * \param height the initial height + * \param title the optional title + * \throw std::runtime_error on errors */ Window(unsigned width = 640, unsigned height = 480, const std::string &title = "Malikania"); @@ -114,7 +114,7 @@ /** * Tells if the window is open. * - * @return true if open + * \return true if open */ inline bool isOpen() const noexcept { @@ -124,7 +124,7 @@ /** * Get the underlying backend. * - * @return the backend + * \return the backend */ inline const Backend &backend() const noexcept { @@ -134,7 +134,7 @@ /** * Overloaded function. * - * @return the backend + * \return the backend */ inline Backend &backend() noexcept { @@ -164,74 +164,74 @@ /** * Get the current drawing color. * - * @return the color + * \return the color */ Color drawingColor() const; /** * Set the drawing color. * - * @param color the color + * \param color the color */ void setDrawingColor(const Color &color); /** * Draw a line. * - * @param line the line + * \param line the line */ void drawLine(const Line &line); /** * Draw a several lines. * - * @param the lines vertices + * \param the lines vertices */ void drawLines(const std::vector<Point> &points); /** * Draw a point. * - * @param point the point + * \param point the point */ void drawPoint(const Point &point); /** * Draw a list of points. * - * @param points the points + * \param points the points */ void drawPoints(const std::vector<Point> &points); /** * Draw a rectangle (only borders). * - * @param rect the rectangle - * @see fillRectangle + * \param rect the rectangle + * \see fillRectangle */ void drawRectangle(const Rectangle &rect); /** * Draw a list of rectangles. * - * @param rects the rectangles - * @see fillRectangles + * \param rects the rectangles + * \see fillRectangles */ void drawRectangles(const std::vector<Rectangle> &rects); /** * Fill the given rectangle with the current color. * - * @param rect the rectangle - * @see drawRectangle + * \param rect the rectangle + * \see drawRectangle */ void fillRectangle(const Rectangle &rect); /** * Fill the list of rectangles with the current color. * - * @param rects the list of rectangles - * @see drawRectangles + * \param rects the list of rectangles + * \see drawRectangles */ void fillRectangles(const std::vector<Rectangle> &rects); @@ -240,9 +240,9 @@ * * This function may stretch the text texture. * - * @param text the text (UTF-8) - * @param font the font - * @param rectangle the rectangle target + * \param text the text (UTF-8) + * \param font the font + * \param rectangle the rectangle target */ void drawText(const std::string &text, Font &font, const Rectangle &rectangle); @@ -251,16 +251,16 @@ * * Draw the text at the given position. * - * @param text the text (UTF-8) - * @param font the font - * @param point the text position + * \param text the text (UTF-8) + * \param font the font + * \param point the text position */ void drawText(const std::string &text, Font &font, const Point &point); /** * Move assigment operator defaulted. * - * @return this + * \return this */ Window &operator=(Window &&); };
--- a/libcommon/malikania/application.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libcommon/malikania/application.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,23 +20,23 @@ #define MALIKANIA_APPLICATION_H /** - * @file application.h - * @brief Main class for the client or server + * \file application.h + * \brief Main class for the client or server */ namespace malikania { /** - * @class Application - * @brief Main class for argument parsing and executable path retrievement + * \class Application + * \brief Main class for argument parsing and executable path retrievement */ class Application { public: /** * Construct the application. * - * @param argc the argument count - * @param argv the arguments + * \param argc the argument count + * \param argv the arguments */ Application(int argc, char **argv);
--- a/libcommon/malikania/backend/sdl/common-sdl.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libcommon/malikania/backend/sdl/common-sdl.h Fri Jun 17 13:07:05 2016 +0200 @@ -37,8 +37,8 @@ * * Seeking past-the-end or past-the-begin readjust the position to the end or begin respectively. * - * @param data the data - * @return the object or nullptr on errors + * \param data the data + * \return the object or nullptr on errors */ SDL_RWops *RWFromBinary(std::string data) noexcept;
--- a/libcommon/malikania/elapsed-timer.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libcommon/malikania/elapsed-timer.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,8 +20,8 @@ #define MALIKANIA_ELAPSED_TIMER_H /** - * @file elapsed-timer.h - * @brief Measure elapsed time + * \file elapsed-timer.h + * \brief Measure elapsed time */ #include <chrono> @@ -31,8 +31,8 @@ namespace malikania { /** - * @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. @@ -73,7 +73,7 @@ /** * Get the number of elapsed milliseconds. * - * @return the milliseconds + * \return the milliseconds */ unsigned elapsed() noexcept; };
--- a/libcommon/malikania/game.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libcommon/malikania/game.h Fri Jun 17 13:07:05 2016 +0200 @@ -32,8 +32,8 @@ } // !json /** - * @class Game - * @brief Basic game class. + * \class Game + * \brief Basic game class. */ class Game { private: @@ -47,14 +47,14 @@ /** * Construct a game. * - * @pre name must not be empty - * @pre version must not be empty - * @pre requires must not be empty - * @param name the game name - * @param version the version - * @param requires the engine version required - * @param license the license (Optional) - * @param authors the authors (Optional) + * \pre name must not be empty + * \pre version must not be empty + * \pre requires must not be empty + * \param name the game name + * \param version the version + * \param requires the engine version required + * \param license the license (Optional) + * \param authors the authors (Optional) */ inline Game(std::string name, std::string version, std::string requires, std::string license, std::string author) : m_name(std::move(name)) @@ -71,7 +71,7 @@ /** * Get the game name. * - * @return the name + * \return the name */ inline const std::string &name() const noexcept { @@ -81,7 +81,7 @@ /** * Get the author. * - * @return the author + * \return the author */ inline const std::string &author() const noexcept { @@ -91,7 +91,7 @@ /** * Get the license. * - * @return the license + * \return the license */ inline const std::string &license() const noexcept { @@ -101,7 +101,7 @@ /** * Get the license. * - * @return the license + * \return the license */ inline const std::string &version() const noexcept { @@ -111,7 +111,7 @@ /** * Get the engine version required to run the game. * - * @return the version required + * \return the version required */ inline const std::string &requires() const noexcept {
--- a/libcommon/malikania/id.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libcommon/malikania/id.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,8 +20,8 @@ #define MALIKANIA_COMMON_ID_H /** - * @file id.h - * @brief Integer id generator + * \file id.h + * \brief Integer id generator */ #include <limits> @@ -31,8 +31,8 @@ namespace malikania { /** - * @class IdGen - * @brief Integer id generator + * \class IdGen + * \brief Integer id generator * * This class helps generating and release unique integer id that can be used anywhere. The ids are generated in a * sequence and when an id is released it is reused instead of incrementing the next number. @@ -53,15 +53,15 @@ /** * Get the next id for that player. * - * @return the id - * @throw std::out_of_range if no number is available + * \return the id + * \throw std::out_of_range if no number is available */ T next(); /** * Release the player id. * - * @param id the id not needed anymore + * \param id the id not needed anymore */ inline void release(T id) noexcept { @@ -104,8 +104,8 @@ } /** - * @class Id - * @brief RAII based id owner + * \class Id + * \brief RAII based id owner * * This class is similar to a std::lock_guard or std::unique_lock in a way that the id is acquired * when the object is instanciated and released when destroyed. @@ -122,8 +122,8 @@ /** * Construct a new Id and take the next number. * - * @param gen the generator - * @throw any exception if IdGen fails to give an id. + * \param gen the generator + * \throw any exception if IdGen fails to give an id. */ inline Id(IdGen<T> &gen) : m_gen(gen) @@ -134,9 +134,9 @@ /** * Construct an Id with an already taken number. * - * @param gen the generator - * @param id the id - * @warning be sure that the id was taken from this generator + * \param gen the generator + * \param id the id + * \warning be sure that the id was taken from this generator */ Id(IdGen<T> &gen, T id) : m_gen(gen) @@ -155,7 +155,7 @@ /** * Get the number id. * - * @return the id + * \return the id */ inline T value() const noexcept {
--- a/libcommon/malikania/js.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libcommon/malikania/js.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,8 +20,8 @@ #define MALIKANIA_JS_H /** - * @file js.h - * @brief Bring JavaScript using Duktape. + * \file js.h + * \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. @@ -30,8 +30,8 @@ */ /** - * @page js JavaScript binding - * @brief JavaScript binding using Duktape + * \page js JavaScript binding + * \brief JavaScript binding using Duktape * * This page will show you how to setup this module to host JavaScript environment into your C++ application. * @@ -60,8 +60,8 @@ */ /** - * @page js-init Initialization - * @brief Context initialization. + * \page js-init Initialization + * \brief Context initialization. * * To host JavaScript, you need a context. Usually one is sufficient but you can create as many as you want but they * won't share any resource. @@ -84,8 +84,8 @@ */ /** - * @page js-types Predefined types - * @brief Default duk::TypeTraits specializations + * \page js-types Predefined types + * \brief Default duk::TypeTraits specializations * * The following specializations are provided with libjs. * @@ -136,8 +136,8 @@ */ /** - * @page js-basics Basics - * @brief Basics use case. + * \page js-basics Basics + * \brief Basics use case. * * The following topics are sample use case of the C++ front end. It does not use extended features that this module * provides. @@ -148,8 +148,8 @@ */ /** - * @page js-basics-t1 Example 1: call JavaScript code from C++ - * @brief Evaluate JavaScript code from C++. + * \page js-basics-t1 Example 1: call JavaScript code from C++ + * \brief Evaluate JavaScript code from C++. * * Let use JavaScript to compute a simple expression. * @@ -169,8 +169,8 @@ */ /** - * @page js-basics-t2 Example 2: call C++ code from JavaScript - * @brief Evaluate a function from JavaScript. + * \page js-basics-t2 Example 2: call C++ code from JavaScript + * \brief Evaluate a function from JavaScript. * * In that example, we will add a C++ function to JavaScript and call it from the script. The function just compute the * two arguments that are passed through the function and return the result. @@ -207,8 +207,8 @@ */ /** - * @page js-basics-t3 Example 3: pushing and getting values - * @brief Manage values between JavaScript and C++. + * \page js-basics-t3 Example 3: pushing and getting values + * \brief Manage values between JavaScript and C++. * * As you have seen in the previous examples, we were pushing some values to the Duktape context. * @@ -291,8 +291,8 @@ */ /** - * @page js-more Extensions and advanced features. - * @brief Evolved extensions provided by libjs. + * \page js-more Extensions and advanced features. + * \brief Evolved extensions provided by libjs. * * The following topics are provided by libjs and have no equivalent in Duktape C API. * @@ -301,8 +301,8 @@ */ /** - * @page js-more-t1 Advanced 1: adding your own types to TypeTraits - * @brief How to specialize duk::TypeTraits structure. + * \page js-more-t1 Advanced 1: adding your own types to TypeTraits + * \brief How to specialize duk::TypeTraits structure. * * This topic shows how you can specialize the duk::TypeTraits structure to add more types. * @@ -311,7 +311,7 @@ * * In this example we will convert a C++ small structure containing two integers to JavaScript. * - * @note It is not required to implement all functions from duk::TypeTraits. Just provide which one you need. + * \note It is not required to implement all functions from duk::TypeTraits. Just provide which one you need. * * ## The C++ structure * @@ -469,8 +469,8 @@ */ /** - * @page js-more-t2 Advanced 2: exporting C++ class - * @brief How to export a C++ class through Duktape. + * \page js-more-t2 Advanced 2: exporting C++ class + * \brief How to export a C++ class through Duktape. * * This example shows how you can implement a C++ class and export it through C++ through the predefined * std::shared_ptr duk::TypeTraits specialization. @@ -479,7 +479,7 @@ * * See this [introduction to OO in JavaScript][oojs]. * - * @note [RTTI] is required in order to make typesafe binding. + * \note [RTTI] is required in order to make typesafe binding. * * ## Ownership * @@ -626,14 +626,14 @@ */ /** - * @page js-concepts Concepts + * \page js-concepts Concepts * * @subpage js-concept-class */ /** - * @page js-concept-class Class (Concept) - * @brief This concept is used when exporting C++ class through JavaScript. + * \page js-concept-class Class (Concept) + * \brief This concept is used when exporting C++ class through JavaScript. * * When using `std::shared_ptr<T>` with duk::TypeTraits, the user must implement some function by specializing * duk::TypeTraits<T>. @@ -671,38 +671,38 @@ class Context; /** - * @brief Typedef without pointer. + * \brief Typedef without pointer. */ using ContextPtr = duk_context *; /** - * @brief Typedef for duk_double_t. + * \brief Typedef for duk_double_t. */ using Double = duk_double_t; /** - * @brief Typedef for duk_idx_t. + * \brief Typedef for duk_idx_t. */ using Index = duk_idx_t; /** - * @brief Typedef for duk_ret_t. + * \brief Typedef for duk_ret_t. */ using Ret = duk_ret_t; /** - * @brief Typedef for duk_int_t. + * \brief Typedef for duk_int_t. */ using Int = duk_int_t; /** - * @brief Typedef for duk_uint_t; + * \brief Typedef for duk_uint_t; */ using Uint = duk_uint_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. @@ -725,8 +725,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) @@ -755,7 +755,7 @@ }; /** - * @brief Inherit this class to make type safe C++ objects into JavaScript + * \brief Inherit this class to make type safe C++ objects into JavaScript */ class Bindable { public: @@ -771,8 +771,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: * @@ -838,50 +838,50 @@ class TypeTraits; /** - * @class Object - * @brief Special type for duk::TypeTraits. + * \class Object + * \brief Special type for duk::TypeTraits. */ class Object { }; /** - * @class Array - * @brief Special type for duk::TypeTraits. + * \class Array + * \brief Special type for duk::TypeTraits. */ class Array { }; /** - * @class Global - * @brief Special type for duk::TypeTraits. + * \class Global + * \brief Special type for duk::TypeTraits. */ class Global { }; /** - * @class Undefined - * @brief Special type for duk::TypeTraits. + * \class Undefined + * \brief Special type for duk::TypeTraits. */ class Undefined { }; /** - * @class Null - * @brief Special type for duk::TypeTraits. + * \class Null + * \brief Special type for duk::TypeTraits. */ class Null { }; /** - * @class This - * @brief Special type for duk::TypeTraits. + * \class This + * \brief Special type for duk::TypeTraits. */ class This { }; /** - * @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. */ @@ -899,19 +899,19 @@ }; /** - * @brief Map of functions. + * \brief Map of functions. */ using FunctionMap = std::unordered_map<std::string, Function>; /** - * @brief Map of any type. + * \brief Map of any type. */ template <typename T> using Map = std::unordered_map<std::string, T>; /** - * @class Exception - * @brief Error description. + * \class Exception + * \brief Error description. * * This class fills the fields got in an Error object. */ @@ -926,7 +926,7 @@ /** * Get the error message. This effectively returns message field. * - * @return the message + * \return the message */ const char *what() const noexcept override { @@ -935,8 +935,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. */ @@ -967,7 +967,7 @@ /** * Convert the context to the native Duktape/C type. * - * @return the duk_context + * \return the duk_context */ inline operator duk_context *() noexcept { @@ -977,7 +977,7 @@ /** * Convert the context to the native Duktape/C type. * - * @return the duk_context + * \return the duk_context */ inline operator duk_context *() const noexcept { @@ -992,7 +992,7 @@ /** * @name Duktape C functions - * @brief The following functions are wrappers on top of the Duktape C functions. + * \brief The following functions are wrappers on top of the Duktape C functions. * * They are as close as possible to the original functions. */ @@ -1004,8 +1004,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) { @@ -1015,9 +1015,9 @@ /** * Wrapper for [duk_base64_encode](http://duktape.org/api.html#duk_base64_encode). * - * @param ctx the context - * @param index the index - * @return the base64 string + * \param ctx the context + * \param index the index + * \return the base64 string */ inline std::string base64Encode(ContextPtr ctx, Index index) { @@ -1027,8 +1027,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) { @@ -1038,8 +1038,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) { @@ -1049,9 +1049,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) { @@ -1061,9 +1061,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 duk_codepoint_t charCodeAt(ContextPtr ctx, Index index, duk_size_t charOffset) { @@ -1073,9 +1073,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) { @@ -1085,9 +1085,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) { @@ -1097,10 +1097,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) { @@ -1110,10 +1110,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) { @@ -1123,8 +1123,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) { @@ -1134,8 +1134,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) { @@ -1145,9 +1145,9 @@ /** * Wrapper for [duk_copy](http://duktape.org/api.html#duk_copy). * - * @param ctx the context - * @param from the from index - * @param to the destination + * \param ctx the context + * \param from the from index + * \param to the destination */ inline void copy(ContextPtr ctx, Index from, Index to) { @@ -1157,8 +1157,8 @@ /** * Wrapper for [duk_new](http://duktape.org/api.html#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) { @@ -1168,9 +1168,9 @@ /** * Wrapper for [duk_def_prop](http://duktape.org/api.html#duk_def_prop). * - * @param ctx the context - * @param index the object index - * @param flags the flags + * \param ctx the context + * \param index the object index + * \param flags the flags */ inline void defineProperty(ContextPtr ctx, Index index, unsigned flags) { @@ -1180,9 +1180,9 @@ /** * Wrapper for [duk_del_prop](http://duktape.org/api.html#duk_del_prop). * - * @param ctx the context - * @param index the object index - * @return true if deleted + * \param ctx the context + * \param index the object index + * \return true if deleted */ inline bool deleteProperty(ContextPtr ctx, Index index) { @@ -1192,10 +1192,10 @@ /** * Wrapper for [duk_del_prop](http://duktape.org/api.html#duk_del_prop). * - * @param ctx the context - * @param index the object index - * @param position the property index - * @return true if deleted + * \param ctx the context + * \param index the object index + * \param position the property index + * \return true if deleted */ inline bool deleteProperty(ContextPtr ctx, Index index, unsigned position) { @@ -1205,10 +1205,10 @@ /** * Wrapper for [duk_del_prop](http://duktape.org/api.html#duk_del_prop). * - * @param ctx the context - * @param index the object index - * @param name the property name - * @return true if deleted + * \param ctx the context + * \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) { @@ -1218,8 +1218,8 @@ /** * Wrapper for [duk_dup](http://duktape.org/api.html#duk_dup). * - * @param ctx the context - * @param index the value to copy + * \param ctx the context + * \param index the value to copy */ inline void dup(ContextPtr ctx, int index = -1) { @@ -1229,10 +1229,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) { @@ -1242,7 +1242,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) { @@ -1252,9 +1252,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) { @@ -1267,9 +1267,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) { @@ -1281,8 +1281,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) { @@ -1292,9 +1292,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) { @@ -1304,10 +1304,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) { @@ -1317,10 +1317,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) { @@ -1330,9 +1330,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) { @@ -1342,10 +1342,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) { @@ -1355,8 +1355,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) { @@ -1366,8 +1366,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) { @@ -1377,9 +1377,9 @@ /** * Wrapper for [duk_json_encode](http://duktape.org/api.html#duk_json_encode). * - * @param ctx the context - * @param index the index - * @return the JSON string + * \param ctx the context + * \param index the index + * \return the JSON string */ inline std::string jsonEncode(ContextPtr ctx, Index index) { @@ -1389,8 +1389,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) { @@ -1400,8 +1400,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) { @@ -1411,8 +1411,8 @@ /** * Wrapper for [duk_pcall_method](http://duktape.org/api.html#duk_pcall_method). * - * @param ctx the context - * @param nargs the number of arguments + * \param ctx the context + * \param nargs the number of arguments */ inline int pcallMethod(ContextPtr ctx, Index nargs = 0) { @@ -1422,9 +1422,9 @@ /** * Wrapper for [duk_pcall_prop](http://duktape.org/api.html#duk_pcall_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 int pcallProperty(ContextPtr ctx, Index index, Index nargs = 0) { @@ -1434,7 +1434,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) { @@ -1444,9 +1444,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) { @@ -1456,9 +1456,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) { @@ -1468,8 +1468,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) { @@ -1479,8 +1479,8 @@ /** * Wrapper for [duk_put_prop](http://duktape.org/api.html#duk_put_prop). * - * @param ctx the context - * @param index the object index + * \param ctx the context + * \param index the object index */ inline void putProperty(ContextPtr ctx, Index index) { @@ -1490,9 +1490,9 @@ /** * Wrapper for [duk_put_prop_string](http://duktape.org/api.html#duk_put_prop_string). * - * @param ctx the context - * @param index the object index - * @param name the property name + * \param ctx the context + * \param index the object index + * \param name the property name */ inline void putProperty(ContextPtr ctx, Index index, const std::string &name) { @@ -1502,9 +1502,9 @@ /** * Wrapper for [duk_put_prop_index](http://duktape.org/api.html#duk_put_prop_index). * - * @param ctx the context - * @param index the object index - * @param position the array position + * \param ctx the context + * \param index the object index + * \param position the array position */ inline void putProperty(ContextPtr ctx, Index index, unsigned position) { @@ -1514,8 +1514,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) { @@ -1525,8 +1525,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) { @@ -1536,8 +1536,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) { @@ -1547,9 +1547,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) { @@ -1559,8 +1559,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) { @@ -1570,8 +1570,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) { @@ -1581,7 +1581,7 @@ /** * Wrapper for [duk_throw](http://duktape.org/api.html#duk_throw). * - * @param ctx the context + * \param ctx the context */ inline void raise(ContextPtr ctx) { @@ -1591,10 +1591,10 @@ /** *Wrapper for [duk_error](http://duktape.org/api.html#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) @@ -1605,9 +1605,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) { @@ -1620,7 +1620,7 @@ /** * @name Extended functions - * @brief Extended functions for libjs. + * \brief Extended functions for libjs. * * The following functions are largely modified or extensions to Duktape. */ @@ -1632,9 +1632,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 Exception exception(ContextPtr ctx, int index) { @@ -1661,8 +1661,8 @@ /** * Push a value into the stack. Calls TypeTraits<T>::push(ctx, value); * - * @param ctx the context - * @param value the value to forward + * \param ctx the context + * \param value the value to forward */ template <typename Type> inline void push(ContextPtr ctx, Type &&value) @@ -1673,8 +1673,8 @@ /** * Put the value to the object at the top of the stack. Calls TypeTraits<T>::put(ctx, value); * - * @param ctx the context - * @param value the value to apply + * \param ctx the context + * \param value the value to apply */ template <typename Type> inline void put(ContextPtr ctx, Type &&value) @@ -1685,9 +1685,9 @@ /** * Generic template function to get a value from the stack. * - * @param ctx the context - * @param index the index - * @return the value + * \param ctx the context + * \param index the index + * \return the value */ template <typename Type> inline auto get(ContextPtr ctx, int index) -> decltype(TypeTraits<Type>::get(ctx, 0)) @@ -1698,9 +1698,9 @@ /** * Require a type at the specified index. * - * @param ctx the context - * @param index the index - * @return the value + * \param ctx the context + * \param index the index + * \return the value */ template <typename Type> inline auto require(ContextPtr ctx, int index) -> decltype(TypeTraits<Type>::require(ctx, 0)) @@ -1713,9 +1713,9 @@ * * The TypeTraits<T> must have `static bool is(ContextPtr ptr, int index)`. * - * @param ctx the context - * @param index the value index - * @return true if is the type + * \param ctx the context + * \param index the value index + * \return true if is the type */ template <typename T> inline bool is(ContextPtr ctx, int index) @@ -1729,10 +1729,10 @@ * * The TypeTraits<T> must have `static T optional(Context &, int index, T &&defaultValue)`. * - * @param ctx the context - * @param index the value index - * @param defaultValue the value replacement - * @return the value or defaultValue + * \param ctx the context + * \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) @@ -1743,11 +1743,11 @@ /** * Get the property `name' as value from the object at the specified index. * - * @param ctx the context - * @param index the object index - * @param name the property name - * @return the value - * @note The stack is unchanged + * \param ctx the context + * \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)) @@ -1762,11 +1762,11 @@ /** * Get a property by index, for arrays. * - * @param ctx the context - * @param index the object index - * @param position the position int the object - * @return the value - * @note The stack is unchanged + * \param ctx the context + * \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)) @@ -1781,10 +1781,10 @@ /** * Get the property `name' and push it to the stack from the object at the specified index. * - * @param ctx the context - * @param index the object index - * @param name the property name - * @note The stack contains the property value + * \param ctx the context + * \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) @@ -1795,10 +1795,10 @@ /** * Get the property by index and push it to the stack from the object at the specified index. * - * @param ctx the context - * @param index the object index - * @param position the position in the object - * @note The stack contains the property value + * \param ctx the context + * \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) @@ -1809,12 +1809,12 @@ /** * Get an optional property `name` from the object at the specified index. * - * @param ctx the context - * @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 ctx the context + * \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))) @@ -1829,12 +1829,12 @@ /** * Get an optional property by index, for arrays * - * @param ctx the context - * @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 ctx the context + * \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))) @@ -1849,11 +1849,11 @@ /** * Set a property to the object at the specified index. * - * @param ctx the context - * @param index the object index - * @param name the property name - * @param value the value to forward - * @note The stack is unchanged + * \param ctx the context + * \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) @@ -1867,11 +1867,11 @@ /** * Set a property by index, for arrays. * - * @param ctx the context - * @param index the object index - * @param position the position in the object - * @param value the value to forward - * @note The stack is unchanged + * \param ctx the context + * \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) @@ -1885,9 +1885,9 @@ /** * Get a global value. * - * @param ctx the context - * @param name the name of the global variable - * @return the value + * \param ctx the context + * \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)) @@ -1911,9 +1911,9 @@ /** * Set a global variable. * - * @param ctx the context - * @param name the name of the global variable - * @param type the value to set + * \param ctx the context + * \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) @@ -1925,8 +1925,8 @@ /** * Put the value at the top of the stack as global property. * - * @param ctx the context - * @param name the property name + * \param ctx the context + * \param name the property name */ inline void putGlobal(ContextPtr ctx, const std::string &name) { @@ -1936,11 +1936,11 @@ /** * Enumerate an object or an array at the specified index. * - * @param ctx the context - * @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 ctx the context + * \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) @@ -1958,8 +1958,8 @@ /** * Return the this binding of the current function. * - * @param ctx the context - * @return the this binding as the template given + * \param ctx the context + * \return the this binding as the template given */ template <typename T> inline auto self(ContextPtr ctx) -> decltype(TypeTraits<T>::require(ctx, 0)) @@ -1974,8 +1974,8 @@ /** * Throw an ECMAScript exception. * - * @param ctx the context - * @param ex the exception + * \param ctx the context + * \param ex the exception */ template <typename Exception> void raise(ContextPtr ctx, const Exception &ex) @@ -1990,9 +1990,9 @@ * * - static void construct(Context &, T): must update this with the value and keep the stack unchanged * - * @param ctx the context - * @param value the value to forward - * @see self + * \param ctx the context + * \param value the value to forward + * \see self */ template <typename T> inline void construct(ContextPtr ctx, T &&value) @@ -2005,9 +2005,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: @@ -2018,8 +2018,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) @@ -2031,7 +2031,7 @@ /** * Constructor with a message. * - * @param message the message + * \param message the message */ inline Error(std::string message) noexcept : m_message(std::move(message)) @@ -2041,8 +2041,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 { @@ -2051,15 +2051,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)) @@ -2068,15 +2068,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)) @@ -2085,15 +2085,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)) @@ -2102,15 +2102,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)) @@ -2119,15 +2119,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)) @@ -2136,15 +2136,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)) @@ -2157,8 +2157,8 @@ * ------------------------------------------------------------------ */ /** - * @class TypeTraits<int> - * @brief Default implementation for int. + * \class TypeTraits<int> + * \brief Default implementation for int. * * Provides: get, is, optional, push, require. */ @@ -2168,9 +2168,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) { @@ -2180,9 +2180,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) { @@ -2192,10 +2192,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) { @@ -2205,8 +2205,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) { @@ -2216,9 +2216,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) { @@ -2227,8 +2227,8 @@ }; /** - * @class TypeTraits<bool> - * @brief Default implementation for bool. + * \class TypeTraits<bool> + * \brief Default implementation for bool. * * Provides: get, is, optional, push, require. */ @@ -2238,9 +2238,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) { @@ -2250,9 +2250,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) { @@ -2262,10 +2262,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) { @@ -2275,8 +2275,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) { @@ -2286,9 +2286,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) { @@ -2297,8 +2297,8 @@ }; /** - * @class TypeTraits<double> - * @brief Default implementation for double. + * \class TypeTraits<double> + * \brief Default implementation for double. * * Provides: get, is, optional, push, require. */ @@ -2308,9 +2308,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) { @@ -2320,9 +2320,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) { @@ -2332,10 +2332,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) { @@ -2345,8 +2345,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) { @@ -2356,9 +2356,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) { @@ -2367,8 +2367,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. * @@ -2380,9 +2380,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) { @@ -2395,9 +2395,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) { @@ -2407,10 +2407,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) { @@ -2420,8 +2420,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) { @@ -2431,9 +2431,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) { @@ -2445,8 +2445,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. */ @@ -2456,9 +2456,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) { @@ -2468,9 +2468,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) { @@ -2480,10 +2480,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) { @@ -2493,8 +2493,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) { @@ -2504,9 +2504,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) { @@ -2515,8 +2515,8 @@ }; /** - * @class TypeTraits<unsigned> - * @brief Default implementation for unsigned. + * \class TypeTraits<unsigned> + * \brief Default implementation for unsigned. * * Provides: get, is, optional, push, require. */ @@ -2526,9 +2526,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 unsigned get(ContextPtr ctx, int index) { @@ -2538,9 +2538,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) { @@ -2550,10 +2550,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 unsigned optional(ContextPtr ctx, int index, unsigned defaultValue) { @@ -2563,8 +2563,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, unsigned value) { @@ -2574,9 +2574,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 unsigned require(ContextPtr ctx, int index) { @@ -2585,7 +2585,7 @@ }; /** - * @brief Implementation for non-managed pointers. + * \brief Implementation for non-managed pointers. * * Provides: get, is, optional, push, require. */ @@ -2595,9 +2595,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) { @@ -2607,9 +2607,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) { @@ -2619,10 +2619,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, T *defaultValue) { @@ -2632,8 +2632,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, T *value) { @@ -2643,9 +2643,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) { @@ -2654,8 +2654,8 @@ }; /** - * @class TypeTraits<Function> - * @brief Push C++ function to the stack. + * \class TypeTraits<Function> + * \brief Push C++ function to the stack. * * Provides: push. * @@ -2667,9 +2667,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) { @@ -2680,8 +2680,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) { @@ -2690,8 +2690,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: put. */ @@ -2701,8 +2701,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 void put(ContextPtr ctx, const FunctionMap &map) { @@ -2716,8 +2716,8 @@ }; /** - * @class TypeTraits<Object> - * @brief Push empty object to the stack. + * \class TypeTraits<Object> + * \brief Push empty object to the stack. * * Provides: is, push. */ @@ -2727,9 +2727,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) { @@ -2739,7 +2739,7 @@ /** * Create an empty object on the stack. * - * @param ctx the context + * \param ctx the context */ static inline void push(ContextPtr ctx, const Object &) { @@ -2748,8 +2748,8 @@ }; /** - * @class TypeTraits<Array> - * @brief Push empty array to the stack. + * \class TypeTraits<Array> + * \brief Push empty array to the stack. * * Provides: is, push. */ @@ -2759,9 +2759,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) { @@ -2771,7 +2771,7 @@ /** * Create an empty array on the stack. * - * @param ctx the context + * \param ctx the context */ static inline void push(ContextPtr ctx, const Array &) { @@ -2780,8 +2780,8 @@ }; /** - * @class TypeTraits<Undefined> - * @brief Push undefined value to the stack. + * \class TypeTraits<Undefined> + * \brief Push undefined value to the stack. * * Provides: is, push. */ @@ -2791,9 +2791,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) { @@ -2803,7 +2803,7 @@ /** * Push undefined value on the stack. * - * @param ctx the context + * \param ctx the context */ static inline void push(ContextPtr ctx, const Undefined &) { @@ -2812,8 +2812,8 @@ }; /** - * @class TypeTraits<Null> - * @brief Push null value to the stack. + * \class TypeTraits<Null> + * \brief Push null value to the stack. * * Provides: is, push. */ @@ -2823,9 +2823,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) { @@ -2835,7 +2835,7 @@ /** * Push null value on the stack. * - * @param ctx the context + * \param ctx the context */ static inline void push(ContextPtr ctx, const Null &) { @@ -2844,7 +2844,7 @@ }; /** - * @brief Push this binding into the stack. + * \brief Push this binding into the stack. * * Provides: push. */ @@ -2854,7 +2854,7 @@ /** * Push this function into the stack. * - * @param ctx the context + * \param ctx the context */ static inline void push(ContextPtr ctx, const This &) { @@ -2863,8 +2863,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. */ @@ -2874,7 +2874,7 @@ /** * Push the global object into the stack. * - * @param ctx the context + * \param ctx the context */ static inline void push(ContextPtr ctx, const Global &) { @@ -2883,7 +2883,7 @@ }; /** - * @brief Push a map of key-value pair as objects. + * \brief Push a map of key-value pair as objects. * * Provides: push, put. * @@ -2895,9 +2895,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) { @@ -2910,9 +2910,9 @@ /** * Apply the map to the object at the top of the stack. * - * @pre top value must be an object - * @param ctx the context - * @param map the map + * \pre top value must be an object + * \param ctx the context + * \param map the map */ static void put(ContextPtr ctx, const std::unordered_map<std::string, T> &map) { @@ -2928,7 +2928,7 @@ }; /** - * @brief Push or get vectors as JavaScript arrays. + * \brief Push or get vectors as JavaScript arrays. * * Provides: get, push, put. */ @@ -2938,9 +2938,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) { @@ -2962,8 +2962,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) { @@ -2976,9 +2976,9 @@ /** * Apply the array to the object at the top of the stack. * - * @pre top value must be an object - * @param ctx the context - * @param array the array + * \pre top value must be an object + * \param ctx the context + * \param array the array */ static void put(ContextPtr ctx, const std::vector<T> &array) { @@ -2995,7 +2995,7 @@ }; /** - * @brief Implementation of managed std::shared_ptr<T>. + * \brief Implementation of managed std::shared_ptr<T>. * * This specialization requires T to be @ref js-concept-class. */ @@ -3024,8 +3024,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, std::shared_ptr<T> value) { @@ -3041,8 +3041,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, std::shared_ptr<T> value) { @@ -3059,9 +3059,9 @@ /** * Get a managed std::shared_ptr from the stack. * - * @param ctx the context - * @param index the object index - * @return the pointer or a null if invalid + * \param ctx the context + * \param index the object index + * \return the pointer or a null if invalid */ static std::shared_ptr<T> get(ContextPtr ctx, Index index) { @@ -3079,9 +3079,9 @@ * * Raise a JavaScript error if the object is not valid. * - * @param ctx the context - * @param index the index - * @return the pointer + * \param ctx the context + * \param index the index + * \return the pointer */ static std::shared_ptr<T> require(ContextPtr ctx, Index index) {
--- a/libcommon/malikania/json.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libcommon/malikania/json.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,8 +20,8 @@ #define MALIKANIA_JSON_H /** - * @file json.h - * @brief Jansson C++14 wrapper + * \file json.h + * \brief Jansson C++14 wrapper */ #include <cassert> @@ -41,7 +41,7 @@ /** * @enum Type - * @brief Type of Value. + * \brief Type of Value. */ enum class Type { Array, //!< Value is an array [] @@ -54,8 +54,8 @@ }; /** - * @class Error - * @brief Error description. + * \class Error + * \brief Error description. */ class Error : public std::exception { private: @@ -69,11 +69,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)) @@ -87,7 +87,7 @@ /** * Get the error message. * - * @return the text + * \return the text */ inline const std::string &text() const noexcept { @@ -97,7 +97,7 @@ /** * Get the source (e.g. a file name). * - * @return the source + * \return the source */ inline const std::string &source() const noexcept { @@ -107,7 +107,7 @@ /** * Get the line. * - * @return the line + * \return the line */ inline int line() const noexcept { @@ -117,7 +117,7 @@ /** * Get the column. * - * @return the column + * \return the column */ inline int column() const noexcept { @@ -127,7 +127,7 @@ /** * Get the position. * - * @return the position + * \return the position */ inline int position() const noexcept { @@ -137,7 +137,7 @@ /** * Get the error message. * - * @return the message + * \return the message */ const char *what() const noexcept override { @@ -146,8 +146,8 @@ }; /** - * @class Iterator - * @brief This is the base class for iterator and const_iterator + * \class Iterator + * \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. @@ -194,9 +194,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 { @@ -209,9 +209,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 { @@ -224,8 +224,8 @@ /** * Dereference the iterator. * - * @pre iterator be dereferenceable - * @return the value + * \pre iterator be dereferenceable + * \return the value */ inline ValueType &operator*() noexcept { @@ -239,8 +239,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 { @@ -254,8 +254,8 @@ /** * Increment the iterator. (Prefix version). * - * @pre iterator must be dereferenceable - * @return *this; + * \pre iterator must be dereferenceable + * \return *this; */ inline Iterator &operator++() noexcept { @@ -271,8 +271,8 @@ /** * Increment the iterator. (Postfix version). * - * @pre iterator must be dereferenceable - * @return *this; + * \pre iterator must be dereferenceable + * \return *this; */ inline Iterator &operator++(int) noexcept { @@ -288,9 +288,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 Iterator &it) const noexcept { @@ -300,8 +300,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 Iterator &it) const noexcept { @@ -310,8 +310,8 @@ }; /** - * @class Value - * @brief Generic JSON value wrapper. + * \class Value + * \brief Generic JSON value wrapper. */ class Value { private: @@ -357,7 +357,7 @@ * * For any other types, initialize with sane default value. * - * @param type the type + * \param type the type */ Value(Type type); @@ -372,7 +372,7 @@ /** * Construct a boolean value. * - * @param value the boolean value + * \param value the boolean value */ inline Value(bool value) noexcept : m_type(Type::Boolean) @@ -383,7 +383,7 @@ /** * Create value from integer. * - * @param value the value + * \param value the value */ inline Value(int value) noexcept : m_type(Type::Int) @@ -394,7 +394,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) @@ -405,7 +405,7 @@ /** * Construct a number value. * - * @param value the real value + * \param value the real value */ inline Value(double value) noexcept : m_type(Type::Real) @@ -416,7 +416,7 @@ /** * Construct a string value. * - * @param value the string + * \param value the string */ inline Value(std::string value) noexcept : m_type(Type::String) @@ -427,8 +427,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) @@ -440,8 +440,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) @@ -453,7 +453,7 @@ /** * Move constructor. * - * @param other the value to move from + * \param other the value to move from */ inline Value(Value &&other) { @@ -463,7 +463,7 @@ /** * Copy constructor. * - * @param other the value to copy from + * \param other the value to copy from */ inline Value(const Value &other) { @@ -473,8 +473,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) { @@ -486,7 +486,7 @@ /** * Move operator. * - * @param other the value to move from + * \param other the value to move from */ inline Value &operator=(Value &&other) { @@ -503,8 +503,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 { @@ -516,8 +516,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 { @@ -529,8 +529,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 { @@ -542,8 +542,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 { @@ -555,8 +555,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 { @@ -568,8 +568,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 { @@ -581,7 +581,7 @@ /** * Get the value type. * - * @return the type + * \return the type */ inline Type typeOf() const noexcept { @@ -591,7 +591,7 @@ /** * Get the value as boolean. * - * @return the value or false if not a boolean + * \return the value or false if not a boolean */ inline bool toBool() const noexcept { @@ -601,7 +601,7 @@ /** * Get the value as integer. * - * @return the value or 0 if not a integer + * \return the value or 0 if not a integer */ inline int toInt() const noexcept { @@ -611,7 +611,7 @@ /** * Get the value as real. * - * @return the value or 0 if not a real + * \return the value or 0 if not a real */ inline double toReal() const noexcept { @@ -621,15 +621,15 @@ /** * 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; /** * Check if the value is boolean type. * - * @return true if boolean + * \return true if boolean */ inline bool isBool() const noexcept { @@ -639,7 +639,7 @@ /** * Check if the value is integer type. * - * @return true if integer + * \return true if integer */ inline bool isInt() const noexcept { @@ -649,7 +649,7 @@ /** * Check if the value is object type. * - * @return true if object + * \return true if object */ inline bool isObject() const noexcept { @@ -659,7 +659,7 @@ /** * Check if the value is array type. * - * @return true if array + * \return true if array */ inline bool isArray() const noexcept { @@ -669,9 +669,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 { @@ -681,7 +681,7 @@ /** * Check if the value is real type. * - * @return true if real + * \return true if real */ inline bool isReal() const noexcept { @@ -691,7 +691,7 @@ /** * Check if the value is null type. * - * @return true if null + * \return true if null */ inline bool isNull() const noexcept { @@ -701,7 +701,7 @@ /** * Check if the value is string type. * - * @return true if string + * \return true if string */ inline bool isString() const noexcept { @@ -711,8 +711,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 { @@ -727,7 +727,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 { @@ -747,9 +747,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 @@ -763,10 +763,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 @@ -780,10 +780,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 { @@ -795,10 +795,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) { @@ -810,10 +810,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 { @@ -826,10 +826,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) { @@ -842,8 +842,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) { @@ -855,8 +855,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) { @@ -868,10 +868,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) { @@ -884,10 +884,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) { @@ -900,8 +900,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) { @@ -913,8 +913,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) { @@ -926,9 +926,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) { @@ -946,9 +946,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 @@ -967,10 +967,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 @@ -989,10 +989,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 { @@ -1004,10 +1004,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) { @@ -1019,9 +1019,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) { @@ -1033,9 +1033,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) { @@ -1047,9 +1047,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 { @@ -1061,9 +1061,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) { @@ -1075,9 +1075,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) { @@ -1089,9 +1089,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 { @@ -1103,8 +1103,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) { @@ -1116,8 +1116,8 @@ /** * Return this value as JSon representation. * - * @param indent the indentation to use (0 == compact, < 0 == tabs, > 0 == number of spaces) - * @return the string + * \param indent the indentation to use (0 == compact, < 0 == tabs, > 0 == number of spaces) + * \return the string */ inline std::string toJson(int indent = 2) const { @@ -1128,15 +1128,15 @@ /** * 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 to create an empty array. * - * @return an empty array + * \return an empty array */ inline Value array() { @@ -1146,8 +1146,8 @@ /** * 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) { @@ -1157,7 +1157,7 @@ /** * Convenient function to create an empty object. * - * @return an empty object + * \return an empty object */ inline Value object() { @@ -1167,8 +1167,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) { @@ -1178,18 +1178,18 @@ /** * Construct a value from a buffer. * - * @param data the JSON data - * @return the parsed value - * @throw Error on errors + * \param data the JSON data + * \return the parsed value + * \throw Error on errors */ Value fromString(const std::string &data); /** * Construct a value from a file. * - * @param path the path to the file - * @return the parsed value - * @throw Error on errors + * \param path the path to the file + * \return the parsed value + * \throw Error on errors */ Value fromFile(const std::string &path);
--- a/libcommon/malikania/resources-loader.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libcommon/malikania/resources-loader.h Fri Jun 17 13:07:05 2016 +0200 @@ -30,13 +30,13 @@ class Game; /** - * @class ResourcesLoader - * @brief Open resources files using a ResourcesLocator. + * \class ResourcesLoader + * \brief Open resources files using a ResourcesLocator. * * This class is used to load resources files that are common to the server and the client. * - * @see ResourcesLoaderClient - * @see ResourcesLoaderServer + * \see ResourcesLoaderClient + * \see ResourcesLoaderServer */ class ResourcesLoader { private: @@ -51,11 +51,11 @@ * You can use this function when you have lot of properties to extract, otherwise, you can use one of the * require* or get* functions to avoid performances overhead. * - * @pre object.isObject() - * @param id the resource id - * @param object the object - * @param props the properties - * @throw std::runtime_error when a property is missing / invalid + * \pre object.isObject() + * \param id the resource id + * \param object the object + * \param props the properties + * \throw std::runtime_error when a property is missing / invalid */ void requires(const std::string &id, const json::Value &object, @@ -64,12 +64,12 @@ /** * Require a string. * - * @pre object.isObject() - * @param id the resource id - * @param object the object - * @param property the property - * @return the string - * @throw std::runtime_error if the property is not a string or missing + * \pre object.isObject() + * \param id the resource id + * \param object the object + * \param property the property + * \return the string + * \throw std::runtime_error if the property is not a string or missing */ std::string requireString(const std::string &id, const json::Value &object, const std::string &property) const; @@ -77,7 +77,7 @@ /** * Construct the ResourcesLoader. * - * @param locator the locator + * \param locator the locator */ ResourcesLoader(ResourcesLocator &locator); @@ -89,7 +89,7 @@ /** * Get the underlying locator. * - * @return the locator + * \return the locator */ inline ResourcesLocator &locator() noexcept { @@ -99,8 +99,8 @@ /** * Load a game. * - * @return the game - * @throw std::runtime_error on errors + * \return the game + * \throw std::runtime_error on errors */ virtual Game loadGame() const; };
--- a/libcommon/malikania/resources-locator.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libcommon/malikania/resources-locator.h Fri Jun 17 13:07:05 2016 +0200 @@ -26,33 +26,33 @@ namespace malikania { /** - * @class ResourcesLocator - * @brief Load files from directories and zip. + * \class ResourcesLocator + * \brief Load files from directories and zip. */ class ResourcesLocator { public: /** * Read a whole resource as a string. * - * @param id the resource id - * @return the string - * @throw std::runtime_error on any errors + * \param id the resource id + * \return the string + * \throw std::runtime_error on any errors */ virtual std::string read(const std::string &id) = 0; /** * Open a resource as a stream. * - * @param id the resource id - * @return the stream - * @throw std::runtime_error on any errors + * \param id the resource id + * \return the stream + * \throw std::runtime_error on any errors */ virtual std::unique_ptr<std::istream> open(const std::string &id) = 0; }; /** - * @class ResourcesLocatorDirectory - * @brief Load a game from a directory. + * \class ResourcesLocatorDirectory + * \brief Load a game from a directory. */ class ResourcesLocatorDirectory : public ResourcesLocator { private: @@ -62,7 +62,7 @@ /** * Load the game from the directory. * - * @param path the base directory + * \param path the base directory */ ResourcesLocatorDirectory(std::string path) noexcept;
--- a/libcommon/malikania/util.h Fri Jun 17 13:02:06 2016 +0200 +++ b/libcommon/malikania/util.h Fri Jun 17 13:07:05 2016 +0200 @@ -20,8 +20,8 @@ #define MALIKANIA_UTIL_H /** - * @file util.h - * @brief Some utilities + * \file util.h + * \brief Some utilities */ #include <algorithm> @@ -36,18 +36,18 @@ * Split the network message buffer by \r\n\r\n and update the * buffer in-place. * - * @param input the buffer to split and update - * @return the list of received message or empty if not ready + * \param input the buffer to split and update + * \return the list of received message or empty if not ready */ std::vector<std::string> netsplit(std::string &input); /** * Clamp the value between low and high. * - * @param value the value - * @param low the minimum value - * @param high the maximum value - * @return the value between minimum and maximum + * \param value the value + * \param low the minimum value + * \param high the maximum value + * \return the value between minimum and maximum */ template <typename T> constexpr T clamp(T value, T low, T high) noexcept