From f892820cea1f2f40f0e5d217782b167a72f088f8 Mon Sep 17 00:00:00 2001
From: Sebastian Gaida <sebastian-gaida@gmx.de>
Date: Tue, 28 Sep 2021 12:07:08 +0200
Subject: [PATCH] [#96] add docu to queueManager

---
 include/vkcv/QueueManager.hpp | 49 ++++++++++++++++++++++++++++++++---
 1 file changed, 45 insertions(+), 4 deletions(-)

diff --git a/include/vkcv/QueueManager.hpp b/include/vkcv/QueueManager.hpp
index 9d219c9d..b2114371 100644
--- a/include/vkcv/QueueManager.hpp
+++ b/include/vkcv/QueueManager.hpp
@@ -14,23 +14,64 @@ namespace vkcv {
 	
 	class QueueManager {
 	public:
+		/**
+		 * creates a QueueManager with the given queue pairs
+		 * @param device device that holds the queues that are specified in the queue pairs
+		 * @param queuePairsGraphics graphic queue pairs of queueFamily and queueIndex
+		 * @param queuePairsCompute compute queue pairs of queueFamily and queueIndex
+		 * @param queuePairsTransfer transfer queue pairs of queueFamily and queueIndex
+		 * @return a QueueManager with the specified queuePairs
+		 */
 		static QueueManager create(vk::Device device,
                             std::vector<std::pair<int, int>> &queuePairsGraphics,
                             std::vector<std::pair<int, int>> &queuePairsCompute,
                             std::vector<std::pair<int, int>> &queuePairsTransfer);
-
+		/**
+		 * returns the default presentQueue. Recommended to use the presentQueue in the Swapchain
+		 * @return a default presentQueue
+		 */
         [[nodiscard]]
         const Queue &getPresentQueue() const;
-		
+
+		/**
+		 * returns all queues with the graphics flag
+		 * @return vector of graphic queues
+		 */
 		[[nodiscard]]
 		const std::vector<Queue> &getGraphicsQueues() const;
-		
+
+		/**
+		 * returns all queues with the compute flag
+		 * @return vector of compute queues
+		 */
 		[[nodiscard]]
         const std::vector<Queue> &getComputeQueues() const;
-		
+
+		/**
+		 * returns all queues with the transfer flag
+		 * @return vector of transfer queues
+		 */
 		[[nodiscard]]
         const std::vector<Queue> &getTransferQueues() const;
 
+		/**
+		 * Given the @p physicalDevice and the @p queuePriorities, the @p queueCreateInfos are computed. First, the requested
+		 * queues are sorted by priority depending on the availability of queues in the queue families of the given
+		 * @p physicalDevice. Then check, if all requested queues are creatable. If so, the @p queueCreateInfos will be computed.
+		 * Furthermore, lists of index pairs (queueFamilyIndex, queueIndex) for later referencing of the separate queues will
+		 * be computed.
+		 * @param[in] physicalDevice The physical device
+		 * @param[in] queuePriorities The queue priorities used for the computation of @p queueCreateInfos
+		 * @param[in] queueFlags The queue flags requesting the queues
+		 * @param[in,out] queueCreateInfos The queue create info structures to be created
+		 * @param[in,out] queuePairsGraphics The list of index pairs (queueFamilyIndex, queueIndex) of queues of type
+		 *      vk::QueueFlagBits::eGraphics
+		 * @param[in,out] queuePairsCompute The list of index pairs (queueFamilyIndex, queueIndex) of queues of type
+		 *      vk::QueueFlagBits::eCompute
+		 * @param[in,out] queuePairsTransfer The list of index pairs (queueFamilyIndex, queueIndex) of queues of type
+		 *      vk::QueueFlagBits::eTransfer
+		 * @throws std::runtime_error If the requested queues from @p queueFlags are not creatable due to insufficient availability.
+		 */
         static void queueCreateInfosQueueHandles(vk::PhysicalDevice &physicalDevice,
                 const std::vector<float> &queuePriorities,
                 const std::vector<vk::QueueFlagBits> &queueFlags,
-- 
GitLab