From 33fcaffcf4a29d40ea83b707892e8ac31f299a99 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 19 Dec 2024 09:26:42 +0100 Subject: [PATCH 1/6] Update RandomGenerator.cpp --- code/Random/RandomGenerator.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/Random/RandomGenerator.cpp b/code/Random/RandomGenerator.cpp index df55230..7780132 100644 --- a/code/Random/RandomGenerator.cpp +++ b/code/Random/RandomGenerator.cpp @@ -83,10 +83,6 @@ RandomGenerator::RandomGenerator( GeneratorType type ) noexcept : ::srand( static_cast(time(nullptr))); } -RandomGenerator::~RandomGenerator() { - // empty -} - int RandomGenerator::get( int lower, int upper ) { int ret( 0 ); if ( GeneratorType::Standard == m_type ) { From 885c8005a4263b4c5e015afc72f2b133ee9d79db Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 19 Dec 2024 09:27:51 +0100 Subject: [PATCH 2/6] Update RandomGenerator.h --- include/cppcore/Random/RandomGenerator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cppcore/Random/RandomGenerator.h b/include/cppcore/Random/RandomGenerator.h index 7feed7a..cd40644 100644 --- a/include/cppcore/Random/RandomGenerator.h +++ b/include/cppcore/Random/RandomGenerator.h @@ -47,7 +47,7 @@ class DLL_CPPCORE_EXPORT RandomGenerator { RandomGenerator( GeneratorType type = GeneratorType::Standard ) noexcept; /// @brief The class destructor. - ~RandomGenerator(); + ~RandomGenerator() = default; /// @brief Gets a new random number. /// @param lower [in] The lower bound. From 9e946ad8c1567a8a6ab80146f69feced7307056a Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 19 Dec 2024 09:28:55 +0100 Subject: [PATCH 3/6] Update doc of TBitField.h --- include/cppcore/Common/TBitField.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cppcore/Common/TBitField.h b/include/cppcore/Common/TBitField.h index 6d30015..742d512 100644 --- a/include/cppcore/Common/TBitField.h +++ b/include/cppcore/Common/TBitField.h @@ -31,7 +31,7 @@ namespace cppcore { /// @class TBitField /// @ingroup CPPCore /// -/// @brief +/// @brief Container to handle specific bitfields. //------------------------------------------------------------------------------------------------- template class TBitField { From 75a3acff39ced15402ad577cca251519fdc67bec Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 19 Dec 2024 09:32:38 +0100 Subject: [PATCH 4/6] Doc; Update THashMap.h --- include/cppcore/Container/THashMap.h | 34 ++++++++++++++++------------ 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/include/cppcore/Container/THashMap.h b/include/cppcore/Container/THashMap.h index 54f7f69..e594d38 100644 --- a/include/cppcore/Container/THashMap.h +++ b/include/cppcore/Container/THashMap.h @@ -28,10 +28,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. namespace cppcore { //------------------------------------------------------------------------------------------------- -/// @class THashMap -/// @ingroup CPPCore +/// @class THashMap +/// @ingroup CPPCore +/// +/// @brief This class implements a hash map. +/// +/// You can work with the hashmap in the following way: /// -/// @brief This class implements a hash map. You can access your data like: /// @code /// using TestHashMap = THashMap: /// TestHashMap hm; @@ -44,6 +47,7 @@ namespace cppcore { template > class THashMap { public: + /// The alias using Hash = THash; /// @brief The initial hash size. @@ -54,7 +58,7 @@ class THashMap { public: /// @brief The class constructor. /// @param init [in] The initial size for the hash. - THashMap(size_t init = InitSize); + explicit THashMap(size_t init = InitSize); /// @brief The class destructor. ~THashMap(); @@ -71,36 +75,36 @@ class THashMap { /// @return true for empty, false for not empty. bool isEmpty() const; - /// @brief Will init the hash-map. - /// @param init [in] The initial size for the hash. + /// @brief Will init the hash-map with the given size. + /// @param[in] init The initial size for the hash. void init(size_t init); - /// @brief The hash-map will be cleared. + /// @brief The hash-map will be cleared. void clear(); - /// @brief A new key value pair will be entered. - /// @param key [in] The key. - /// @param value [in] The value to store. + /// @brief A new key value pair will be entered. + /// @param[in] key The key. + /// @param[in] value The value to store. void insert(const T &key, const U &value); /// @brief Will remove a given key-value pair form the hash-map. - /// @param key [in] The key to look for. + /// @param[in] key The key to look for. /// @return true, if key-value pair was found and removed. bool remove(const T &key); /// @brief Looks for a given key and returns true, if a key-value pair is stored in the list. - /// @param key [in] The key to look for. + /// @param[in] key The key to look for. /// @return true, if key-value pair was found. bool hasKey(const T &key) const; /// @brief Returns the assigned value for the given key. - /// @param key [in] The key to look for. - /// @param value [in] The value, unset when no key-value pair was found. + /// @param[in] key The key to look for. + /// @param[in] value The value, unset when no key-value pair was found. /// @return true, if key-value pair was found, false if not. bool getValue(const T &key, U &value) const; /// @brief Returns the assigned value for the given key. - /// @param key [in] The key to look for. + /// @param[in] key The key to look for. /// @return The value, will unset when no key-value pair was found. U &operator[](const T &key) const; From e8ce00345475f82cb12fa73e182362cc2dcf5df1 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 19 Dec 2024 09:33:55 +0100 Subject: [PATCH 5/6] Doc: Update TQueue.h --- include/cppcore/Container/TQueue.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/cppcore/Container/TQueue.h b/include/cppcore/Container/TQueue.h index ad79d55..34a55fb 100644 --- a/include/cppcore/Container/TQueue.h +++ b/include/cppcore/Container/TQueue.h @@ -28,10 +28,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. namespace cppcore { //------------------------------------------------------------------------------------------------- -/// @class TQueue -/// @ingroup CPPCore +/// @class TQueue +/// @ingroup CPPCore /// -/// @brief This template class implements a simple queue ( works FIFO ). +/// @brief This template class implements a simple queue ( works FIFO ). //------------------------------------------------------------------------------------------------- template> class TQueue { @@ -41,7 +41,7 @@ class TQueue { /// @brief The class copy constructor. /// @param rhs [in] The instance to copy from. - TQueue( const TQueue &rhs ); + TQueue(const TQueue &rhs ); /// @brief The destructor. ~TQueue(); @@ -109,9 +109,9 @@ inline bool TQueue::dequeue( T &item ) { m_QueueData.removeFront(); if ( isEmpty() ) { return false; - } else { - return true; - } + } + + return true; } template From c55c46dae3d20702116f83c1a3cc9fa167a3f97b Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 19 Dec 2024 09:45:54 +0100 Subject: [PATCH 6/6] Update TStaticArray.h --- include/cppcore/Container/TStaticArray.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/include/cppcore/Container/TStaticArray.h b/include/cppcore/Container/TStaticArray.h index c4a87a1..94423cb 100644 --- a/include/cppcore/Container/TStaticArray.h +++ b/include/cppcore/Container/TStaticArray.h @@ -28,24 +28,25 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. namespace cppcore { //------------------------------------------------------------------------------------------------- -/// @class TArray -/// @ingroup CPPCore +/// @class TArray +/// @ingroup CPPCore +/// +/// @brief This template class implements a simple array with dynamic boundaries. /// -/// @brief This template class implements a simple array with dynamic boundaries. /// You can use it to add new items, remove them and iterate through them. The data items are /// stores in an array. //------------------------------------------------------------------------------------------------- template class TStaticArray { public: - /// @brief The default class constructor. + /// @brief The default class constructor. TStaticArray(); /// @brief The class constructor with the initial value. - /// @param initValue [in] The initial value. - TStaticArray(T initValue); + /// @param[in] initValue The initial value. + explicit TStaticArray(T initValue); - /// @brief The copy constructor. + /// @brief The copy constructor. /// @param rhs [in] The array to copy from. TStaticArray(const TStaticArray &rhs); @@ -53,16 +54,16 @@ class TStaticArray { ~TStaticArray() = default; /// @brief Returns the number of items in the array. - /// @retun The size of the array. + /// @return The size of the array. size_t size() const; /// @brief Will set the item at the given index. - /// @param index [in] The requested index. - /// @param value [in] The new value. + /// @param[in] index The requested index. + /// @param[in] value The new value. void set(size_t index, T value); /// @brief Will set all values to the same value. - /// @param value. [in] The value to set. + /// @param[in] value The value to set. void memset(T value); /// @brief The index op.