From 285026188acbd180d57de87db2a3fc71e0ddf9c7 Mon Sep 17 00:00:00 2001 From: roby2014 Date: Sat, 18 Nov 2023 05:56:58 +0000 Subject: [PATCH] refactor(core): remove function pointer docs --- .../cubos/core/reflection/traits/array.hpp | 14 -------- .../core/reflection/traits/constructible.hpp | 6 ---- .../core/reflection/traits/dictionary.hpp | 33 ------------------- .../reflection/traits/string_conversion.hpp | 5 --- 4 files changed, 58 deletions(-) diff --git a/core/include/cubos/core/reflection/traits/array.hpp b/core/include/cubos/core/reflection/traits/array.hpp index 911083841..85f4847e4 100644 --- a/core/include/cubos/core/reflection/traits/array.hpp +++ b/core/include/cubos/core/reflection/traits/array.hpp @@ -24,38 +24,24 @@ namespace cubos::core::reflection class ConstView; /// @brief Function pointer to get the length of an array instance. - /// @param instance Pointer to the instance. using Length = std::size_t (*)(const void* instance); /// @brief Function pointer to get the address of an element in an array instance. - /// @param instance Pointer to the instance. - /// @param index Element index. using AddressOf = uintptr_t (*)(const void* instance, std::size_t index); /// @brief Function pointer to insert a default value into the array. - /// @param instance Pointer to the instance. - /// @param index Element index. using InsertDefault = void (*)(void* instance, std::size_t index); /// @brief Function pointer to insert a copy of the given value into the array. - /// @param instance Pointer to the instance. - /// @param index Element index. - /// @param value Value. using InsertCopy = void (*)(void* instance, std::size_t index, const void* value); /// @brief Function pointer to move the given value into the array. - /// @param instance Pointer to the instance. - /// @param index Element index. - /// @param value Value. using InsertMove = void (*)(void* instance, std::size_t index, void* value); /// @brief Function pointer to remove an element of the array. - /// @param instance Pointer to the instance. - /// @param index Element index. using Erase = void (*)(void* instance, std::size_t index); /// @brief Constructs. - /// @param elementType Element type of the array. /// @param length Function used to get the length of an array. /// @param addressOf Function used to address an element in an array. ArrayTrait(const Type& elementType, Length length, AddressOf addressOf); diff --git a/core/include/cubos/core/reflection/traits/constructible.hpp b/core/include/cubos/core/reflection/traits/constructible.hpp index 30219c08e..602365a40 100644 --- a/core/include/cubos/core/reflection/traits/constructible.hpp +++ b/core/include/cubos/core/reflection/traits/constructible.hpp @@ -18,21 +18,15 @@ namespace cubos::core::reflection { public: /// @brief Function pointer to the destructor of a type. - /// @param instance Pointer to the instance to destruct. using Destructor = void (*)(void* instance); /// @brief Function pointer to the default constructor of a type. - /// @param instance Pointer to the location to construct the instance at. using DefaultConstructor = void (*)(void* instance); /// @brief Function pointer to the copy constructor of a type. - /// @param instance Pointer to the location to construct the instance at. - /// @param other Pointer to the instance to copy construct from. using CopyConstructor = void (*)(void* instance, const void* other); /// @brief Function pointer to the move constructor of a type. - /// @param instance Pointer to the location to construct the instance at. - /// @param other Pointer to the instance to move construct from. using MoveConstructor = void (*)(void* instance, void* other); /// @brief Builder for @ref ConstructibleTrait. diff --git a/core/include/cubos/core/reflection/traits/dictionary.hpp b/core/include/cubos/core/reflection/traits/dictionary.hpp index 32eaa1e6e..a5eace4c0 100644 --- a/core/include/cubos/core/reflection/traits/dictionary.hpp +++ b/core/include/cubos/core/reflection/traits/dictionary.hpp @@ -30,70 +30,37 @@ namespace cubos::core::reflection class ConstIterator; /// @brief Function pointer to get the length of a dictionary instance. - /// @param instance Dictionary instance. - /// @return Length. using Length = std::size_t (*)(const void* instance); /// @brief Function pointer to get an iterator to the first key-value pair of a dictionary /// instance. - /// @note @ref Stop should be called on the returned iterator when it is no longer needed. - /// @param instance Dictionary instance. - /// @param writeable Whether the iterator should provide write access. - /// @return Iterator. using Begin = void* (*)(uintptr_t instance, bool writeable); /// @brief Function pointer to get an iterator to a value in an dictionary instance. - /// @note @ref Stop should be called on the returned iterator when it is no longer needed. - /// @param instance Dictionary instance. - /// @param key Key. - /// @param writeable Whether the iterator should provide write access. - /// @return Iterator to the found key-value pair, or null if not found. using Find = void* (*)(uintptr_t instance, const void* key, bool writeable); /// @brief Function pointer to advance an iterator. - /// @param instance Dictionary instance. - /// @param iterator Iterator. - /// @param writeable Whether the iterator provides write access. - /// @return Whether the iterator is still valid. using Advance = bool (*)(uintptr_t instance, void* iterator, bool writeable); /// @brief Function pointer to destroy an iterator instance. - /// @param iterator Iterator to the key-value pair. - /// @param writeable Whether the iterator provides write access. using Stop = void (*)(void* iterator, bool writeable); /// @brief Function pointer to get the address of the key pointed to by an iterator. - /// @param iterator Iterator. - /// @param writeable Whether the iterator provides write access. - /// @return Key address. using Key = const void* (*)(const void* iterator, bool writeable); /// @brief Function pointer to get the address of the value pointed to by an iterator. - /// @param iterator Iterator. - /// @param writeable Whether the iterator provides write access. - /// @return Value address. using Value = uintptr_t (*)(const void* iterator, bool writeable); /// @brief Function pointer to insert a default value into a dictionary instance. - /// @param instance Dictionary instance. - /// @param key Key. using InsertDefault = void (*)(void* instance, const void* key); /// @brief Function pointer to insert a copy of the given value into a dictionary instance. - /// @param instance Dictionary instance. - /// @param key Key. - /// @param value Value. using InsertCopy = void (*)(void* instance, const void* key, const void* value); /// @brief Function pointer to move the given value into a dictionary instance. - /// @param instance Dictionary instance. - /// @param key Key. - /// @param value Value. using InsertMove = void (*)(void* instance, const void* key, void* value); /// @brief Function pointer to remove a key-value pair of a dictionary instance. - /// @param instance Dictionary instance. - /// @param iterator Iterator to the key-value pair with write access. using Erase = void (*)(void* instance, const void* iterator); /// @brief Constructs. diff --git a/core/include/cubos/core/reflection/traits/string_conversion.hpp b/core/include/cubos/core/reflection/traits/string_conversion.hpp index a06eccc42..8a972a668 100644 --- a/core/include/cubos/core/reflection/traits/string_conversion.hpp +++ b/core/include/cubos/core/reflection/traits/string_conversion.hpp @@ -17,14 +17,9 @@ namespace cubos::core::reflection { public: /// @brief Function pointer to convert an instance of the type into a string. - /// @param instance Instance. - /// @return String. using Into = std::string (*)(const void* instance); /// @brief Function pointer to convert a string into an instance of the type. - /// @param instance Instance. - /// @param string String. - /// @return Whether the string was valid. using From = bool (*)(void* instance, const std::string& string); /// @brief Constructs.