From f266bf15b524bc152bc365c67762f5f5c796c2cc Mon Sep 17 00:00:00 2001
From: Tobias Frisch <tfrisch@uni-koblenz.de>
Date: Wed, 25 May 2022 16:47:44 +0200
Subject: [PATCH] Added doxygen comments to handles and adjusted enum classes

Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de>
---
 include/vkcv/Buffer.hpp        |  2 +-
 include/vkcv/Handles.hpp       | 49 +++++++++++++++++++++++++++++-----
 include/vkcv/Image.hpp         |  3 +++
 include/vkcv/Logger.hpp        |  2 +-
 include/vkcv/PushConstants.hpp |  5 +++-
 include/vkcv/Result.hpp        |  5 +++-
 include/vkcv/Sampler.hpp       |  8 +++---
 include/vkcv/ShaderProgram.hpp |  4 +++
 include/vkcv/Surface.hpp       |  5 +++-
 include/vkcv/Swapchain.hpp     |  5 +++-
 include/vkcv/Window.hpp        |  3 +++
 11 files changed, 74 insertions(+), 17 deletions(-)

diff --git a/include/vkcv/Buffer.hpp b/include/vkcv/Buffer.hpp
index a3784087..52056d9f 100644
--- a/include/vkcv/Buffer.hpp
+++ b/include/vkcv/Buffer.hpp
@@ -13,7 +13,7 @@
 namespace vkcv {
 
 	/**
-	 * @brief Template class for buffer management and filling data.
+	 * @brief Template class for buffer handling and filling data.
 	 *
 	 * @tparam T Buffer content type
 	 */
diff --git a/include/vkcv/Handles.hpp b/include/vkcv/Handles.hpp
index f5eddb2e..bfe2ac26 100644
--- a/include/vkcv/Handles.hpp
+++ b/include/vkcv/Handles.hpp
@@ -13,7 +13,10 @@ namespace vkcv
 {
 	
 	typedef typename event_function<uint64_t>::type HandleDestroyFunction;
-	
+
+    /**
+     * Class for general memory management via handles.
+     */
 	class Handle {
 		friend std::ostream& operator << (std::ostream& out, const Handle& handle);
 		
@@ -88,50 +91,73 @@ namespace vkcv
 	 * @return Output stream after printing
 	 */
 	std::ostream& operator << (std::ostream& out, const Handle& handle);
-	
-    // Handle returned for any buffer created with the core/context objects
+
+    /**
+     * @brief Handle class for buffers.
+     */
     class BufferHandle : public Handle {
     	friend class BufferManager;
 	private:
 		using Handle::Handle;
     };
-	
+
+    /**
+     * @brief Handle class for render passes.
+     */
 	class PassHandle : public Handle {
 		friend class PassManager;
 	private:
 		using Handle::Handle;
 	};
-	
+
+    /**
+     * @brief Handle class for graphics pipelines.
+     */
 	class GraphicsPipelineHandle : public Handle {
 		friend class GraphicsPipelineManager;
 	private:
 		using Handle::Handle;
 	};
 
+    /**
+     * @brief Handle class for compute pipelines.
+     */
     class ComputePipelineHandle : public Handle {
         friend class ComputePipelineManager;
     private:
         using Handle::Handle;
     };
-	
+
+    /**
+     * @brief Handle class for descriptor sets.
+     */
 	class DescriptorSetHandle : public Handle {
 		friend class DescriptorManager;
 	private:
 		using Handle::Handle;
 	};
 
+    /**
+     * @brief Handle class for descriptor set layouts.
+     */
 	class DescriptorSetLayoutHandle : public Handle {
 	    friend class DescriptorManager;
 	private:
 	    using Handle::Handle;
 	};
-	
+
+    /**
+     * @brief Handle class for samplers.
+     */
 	class SamplerHandle : public Handle {
 		friend class SamplerManager;
 	private:
 		using Handle::Handle;
 	};
 
+    /**
+     * @brief Handle class for images.
+     */
 	class ImageHandle : public Handle {
 		friend class ImageManager;
 	private:
@@ -156,18 +182,27 @@ namespace vkcv
 		
 	};
 
+    /**
+     * @brief Handle class for windows.
+     */
 	class WindowHandle : public Handle {
 		friend class WindowManager;
 	private:
 		using Handle::Handle;
 	};
 
+    /**
+     * @brief Handle class for swapchains.
+     */
 	class SwapchainHandle : public Handle {
 		friend class SwapchainManager;
 	private:
 		using Handle::Handle;
 	};
 
+    /**
+     * @brief Handle class for command streams.
+     */
     class CommandStreamHandle : public Handle {
         friend class CommandStreamManager;
     private:
diff --git a/include/vkcv/Image.hpp b/include/vkcv/Image.hpp
index 06090750..5d535928 100644
--- a/include/vkcv/Image.hpp
+++ b/include/vkcv/Image.hpp
@@ -23,6 +23,9 @@ namespace vkcv {
 	 */
 	bool isDepthFormat(const vk::Format format);
 
+    /**
+     * @brief Class for image handling and filling data.
+     */
 	class Image {
 		friend class Core;
 	public:
diff --git a/include/vkcv/Logger.hpp b/include/vkcv/Logger.hpp
index 20de2f4c..9d4fa86f 100644
--- a/include/vkcv/Logger.hpp
+++ b/include/vkcv/Logger.hpp
@@ -10,7 +10,7 @@
 namespace vkcv {
 	
 	/**
-	 * Enum class to specify the level of logging.
+	 * @brief Enum class to specify the level of logging.
 	 */
 	enum class LogLevel {
 		RAW_INFO,
diff --git a/include/vkcv/PushConstants.hpp b/include/vkcv/PushConstants.hpp
index 9b870a07..ca826ea5 100644
--- a/include/vkcv/PushConstants.hpp
+++ b/include/vkcv/PushConstants.hpp
@@ -11,7 +11,10 @@
 #include "Logger.hpp"
 
 namespace vkcv {
-	
+
+    /**
+     * @brief Class to handle push constants data per drawcall.
+     */
 	class PushConstants {
 	private:
 		std::vector<uint8_t> m_data;
diff --git a/include/vkcv/Result.hpp b/include/vkcv/Result.hpp
index f9d8a180..328a44fa 100644
--- a/include/vkcv/Result.hpp
+++ b/include/vkcv/Result.hpp
@@ -6,7 +6,10 @@
  */
 
 namespace vkcv {
-	
+
+    /**
+     * @brief Enum class to specify the result of a function call.
+     */
 	enum class Result {
 		SUCCESS = 0,
 		ERROR = 1
diff --git a/include/vkcv/Sampler.hpp b/include/vkcv/Sampler.hpp
index 141c4511..c65ef821 100644
--- a/include/vkcv/Sampler.hpp
+++ b/include/vkcv/Sampler.hpp
@@ -8,7 +8,7 @@
 namespace vkcv {
 
     /**
-     * Enum class to specify a samplers type to filter during access.
+     * @brief Enum class to specify a samplers type to filter during access.
      */
 	enum class SamplerFilterType {
 		NEAREST = 1,
@@ -16,7 +16,7 @@ namespace vkcv {
 	};
 
     /**
-     * Enum class to specify a samplers mode to access mipmaps.
+     * @brief Enum class to specify a samplers mode to access mipmaps.
      */
 	enum class SamplerMipmapMode {
 		NEAREST = 1,
@@ -24,7 +24,7 @@ namespace vkcv {
 	};
 
     /**
-     * Enum class to specify a samplers mode to access via address space.
+     * @brief Enum class to specify a samplers mode to access via address space.
      */
 	enum class SamplerAddressMode {
 		REPEAT = 1,
@@ -35,7 +35,7 @@ namespace vkcv {
 	};
 
     /**
-     * Enum class to specify a samplers color beyond a textures border.
+     * @brief Enum class to specify a samplers color beyond a textures border.
      */
 	enum class SamplerBorderColor {
 		INT_ZERO_OPAQUE = 1,
diff --git a/include/vkcv/ShaderProgram.hpp b/include/vkcv/ShaderProgram.hpp
index a45394dc..cfcc69f6 100644
--- a/include/vkcv/ShaderProgram.hpp
+++ b/include/vkcv/ShaderProgram.hpp
@@ -19,6 +19,9 @@
 
 namespace vkcv {
 
+    /**
+     * @brief Class to manage and reflect shaders as a program.
+     */
 	class ShaderProgram
 	{
     public:
@@ -97,6 +100,7 @@ namespace vkcv {
         std::vector<VertexAttachment> m_VertexAttachments;
         std::unordered_map<uint32_t, DescriptorBindings> m_DescriptorSets;
 		size_t m_pushConstantsSize = 0;
+
 	};
 
 }
diff --git a/include/vkcv/Surface.hpp b/include/vkcv/Surface.hpp
index d0b77b0c..47862b9c 100644
--- a/include/vkcv/Surface.hpp
+++ b/include/vkcv/Surface.hpp
@@ -14,7 +14,10 @@ namespace vkcv {
 	
 	const uint32_t MIN_SURFACE_SIZE = 2;
 
-	class Surface {
+    /**
+     * @brief Class to handle surfaces to use with a swapchain.
+     */
+	class Surface final {
 	private:
 		friend class Swapchain;
 		friend class SwapchainManager;
diff --git a/include/vkcv/Swapchain.hpp b/include/vkcv/Swapchain.hpp
index 472385ba..9380b97c 100644
--- a/include/vkcv/Swapchain.hpp
+++ b/include/vkcv/Swapchain.hpp
@@ -14,7 +14,10 @@
 
 namespace vkcv
 {
-	
+
+    /**
+     * @brief Class to handle swapchains using a context.
+     */
     class Swapchain final {
     private:
     	friend class Core;
diff --git a/include/vkcv/Window.hpp b/include/vkcv/Window.hpp
index 39e5b9eb..d1db4bf4 100644
--- a/include/vkcv/Window.hpp
+++ b/include/vkcv/Window.hpp
@@ -19,6 +19,9 @@ struct GLFWwindow;
 
 namespace vkcv {
 
+    /**
+     * @brief Class to handle a window.
+     */
     class Window {
 		friend class WindowManager;
 		friend class SwapchainManager;
-- 
GitLab