From 89f60c8dc2a83e35c1e2a7738d8243d41fc4fd85 Mon Sep 17 00:00:00 2001
From: Tobias Frisch <tfrisch@uni-koblenz.de>
Date: Sun, 22 May 2022 22:46:12 +0200
Subject: [PATCH] Adjusted doxygen comments to logging and push constants

Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de>
---
 include/vkcv/Logger.hpp        | 24 ++++++++++-----
 include/vkcv/PushConstants.hpp | 53 ++++++++++++++++++++++------------
 2 files changed, 50 insertions(+), 27 deletions(-)

diff --git a/include/vkcv/Logger.hpp b/include/vkcv/Logger.hpp
index 28f01b2c..20de2f4c 100644
--- a/include/vkcv/Logger.hpp
+++ b/include/vkcv/Logger.hpp
@@ -20,8 +20,10 @@ namespace vkcv {
 	};
 	
 	/**
-	 * Return the fitting output stream to print messages of a given level of logging.
-	 * @param level Level of logging
+	 * @brief Return the fitting output stream to print messages
+	 * of a given level of logging.
+	 *
+	 * @param[in] level Level of logging
 	 * @return Output stream (stdout or stderr)
 	 */
 	constexpr auto getLogOutput(LogLevel level) {
@@ -35,8 +37,10 @@ namespace vkcv {
 	}
 	
 	/**
-	 * Return the fitting identifier for messages of a given level of logging.
-	 * @param level Level of logging
+	 * @brief Returns the fitting identifier for messages of
+	 * a given level of logging.
+	 *
+	 * @param[in] level Level of logging
 	 * @return Identifier of the given level of logging
 	 */
 	constexpr const char* getLogName(LogLevel level) {
@@ -63,8 +67,10 @@ namespace vkcv {
 #endif
 
 /**
- * Macro-function to log formatting messages with a specific level of logging.
- * @param level Level of logging
+ * @brief Macro-function to log formatting messages with
+ * a specific level of logging.
+ *
+ * @param[in] level Level of logging
  */
 #define vkcv_log(level, ...) {             \
   char output_message [                    \
@@ -99,8 +105,10 @@ namespace vkcv {
 
 #else
 /**
- * Macro-function to log formatting messages with a specific level of logging.
- * @param level Level of logging
+ * @brief Macro-function to log formatting messages with
+ * a specific level of logging.
+ *
+ * @param[in] level Level of logging
  */
 #define vkcv_log(level, ...) {}
 #endif
diff --git a/include/vkcv/PushConstants.hpp b/include/vkcv/PushConstants.hpp
index 83968d4f..9b870a07 100644
--- a/include/vkcv/PushConstants.hpp
+++ b/include/vkcv/PushConstants.hpp
@@ -34,7 +34,10 @@ namespace vkcv {
 		PushConstants& operator=(PushConstants&& other) = default;
 		
 		/**
-		 * @return The size of the data that is bound per drawcall in bytes
+		 * @brief Returns the size of the data that is bound
+		 * per drawcall in bytes.
+		 *
+		 * @return Size of data per drawcall
 		 */
 		[[nodiscard]]
 		size_t getSizePerDrawcall() const {
@@ -42,7 +45,10 @@ namespace vkcv {
 		}
 		
 		/**
-		 * @return The size of the total data stored for push constants in bytes
+		 * @brief Returns the size of total data stored for
+		 * push constants in bytes
+		 *
+		 * @return Total size of data
 		 */
 		[[nodiscard]]
 		size_t getFullSize() const {
@@ -50,7 +56,10 @@ namespace vkcv {
 		}
 		
 		/**
-		 * @return The number of drawcalls that data is stored for
+		 * @brief Returns the number of drawcalls that data
+		 * is stored for.
+		 *
+		 * @return Number of drawcalls
 		 */
 		[[nodiscard]]
 		size_t getDrawcallCount() const {
@@ -58,18 +67,20 @@ namespace vkcv {
 		}
 		
 		/**
-		 * @brief Clear the drawcall data
+		 * @brief Clears the data for all drawcalls currently.
+		 * stored.
 		*/
 		void clear() {
 			m_data.clear();
 		}
 		
 		/**
-		 * @brief Append data for a single drawcall
+		 * @brief Appends data for a single drawcall to the
+		 * storage with a given type.
 		 * 
-		 * @tparam T Type of data to append, must match the size of the #PushConstants per drawcall size
-		 * @param value Data to append
-		 * @return If operation was successfull
+		 * @tparam T Type of data (must match the size per drawcall)
+		 * @param[in] value Data to append
+		 * @return True, if operation was successfull, otherwise false
 		 */
 		template<typename T = uint8_t>
 		bool appendDrawcall(const T& value) {
@@ -86,10 +97,11 @@ namespace vkcv {
 		}
 		
 		/**
-		 * @brief Get the data for a single drawcall as reference
+		 * @brief Returns the data of the drawcall by a given index
+		 * as reference.
 		 * 
-		 * @tparam T Type of data to return
-		 * @param index Index of the drawcall data to return
+		 * @tparam T Type of data
+		 * @param[in] index Index of the drawcall
 		 * @return Drawcall data
 		 */
 		template<typename T = uint8_t>
@@ -99,10 +111,11 @@ namespace vkcv {
 		}
 		
 		/**
-		 * @brief Get the data for a single drawcall as const reference
+		 * @brief Returns the data of the drawcall by a given index
+		 * as const reference.
 		 *
-		 * @tparam T Type of data to return
-		 * @param index Index of the drawcall data to return
+		 * @tparam T Type of data
+		 * @param[in] index Index of the drawcall
 		 * @return Drawcall data
 		 */
 		template<typename T = uint8_t>
@@ -112,9 +125,10 @@ namespace vkcv {
 		}
 		
 		/**
-		 * @brief Get the data for a single drawcall as a void pointer
+		 * @brief Returns the data of the drawcall by a given index
+		 * as a pointer.
 		 * 
-		 * @param index Index of the drawcall data to return
+		 * @param[in] index Index of the drawcall
 		 * @return Drawcall data
 		 */
 		[[nodiscard]]
@@ -124,9 +138,10 @@ namespace vkcv {
 		}
 		
 		/**
-		 * @return Raw pointer to the entire drawcall data array, 
-		 * might be nullptr if data is empty, 
-		 * pointer might be invalidated by clearing or adding data
+		 * @brief Returns the pointer to the entire drawcall data which
+		 * might be nullptr if the data is empty.
+		 *
+		 * @return Pointer to the data
 		 */
 		[[nodiscard]]
 		const void* getData() const {
-- 
GitLab