From fc048fdd37818ddf0db2821d6da3a4b06f3cb69e Mon Sep 17 00:00:00 2001 From: Louis Langholtz Date: Wed, 11 Oct 2023 15:00:30 -0600 Subject: [PATCH] Adds invariant doxygen doc info to World class & updates formatting --- Library/include/playrho/d2/World.hpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Library/include/playrho/d2/World.hpp b/Library/include/playrho/d2/World.hpp index 9973957186..b451dcfcd7 100644 --- a/Library/include/playrho/d2/World.hpp +++ b/Library/include/playrho/d2/World.hpp @@ -543,6 +543,11 @@ inline ContactCounter GetContactCount(const World& world) noexcept /// in his January 2017 Norwegian Developers Conference London talk "Better Code: Runtime /// Polymorphism". /// +/// @invariant GetType(const World& world) for a world in a valid and specified +/// state, always returns the ID for the type which a @c TypeCast function template can be +/// instantiated for when called with the @c world object, to access the underlying typed +/// data of that world. +/// /// @attention For example, the following could be used to create a dynamic body having a one /// meter radius disk shape: /// @code{.cpp} @@ -567,7 +572,6 @@ class World /// @param def A customized world configuration or its default value. /// @note A lot more configurability can be had via the StepConf /// data that's given to the Step(World&, const StepConf&) function. - /// @throws InvalidArgument if the given max vertex radius is less than the min. /// @see Step(World&, const StepConf&). explicit World(const WorldConf& def = WorldConf{}); @@ -635,15 +639,11 @@ class World friend void SetPostSolveContactListener(World& world, ImpulsesContactListener listener) noexcept; // Miscellaneous friend functions... - friend TypeID GetType(const World& world) noexcept; - template friend std::add_pointer_t> TypeCast(const World* value) noexcept; - template friend std::add_pointer_t TypeCast(World* value) noexcept; - friend void Clear(World& world) noexcept; friend StepStats Step(World& world, const StepConf& conf); friend bool IsStepComplete(const World& world) noexcept; @@ -1044,7 +1044,6 @@ class World virtual Manifold GetManifold_(ContactID id) const = 0; /// @} - }; template