Skip to content
Snippets Groups Projects
Verified Commit 89f60c8d authored by Tobias Frisch's avatar Tobias Frisch
Browse files

Adjusted doxygen comments to logging and push constants

parent 160c8569
No related branches found
No related tags found
1 merge request!97Resolve "Dokumentation vervollständigen"
...@@ -20,8 +20,10 @@ namespace vkcv { ...@@ -20,8 +20,10 @@ namespace vkcv {
}; };
/** /**
* Return the fitting output stream to print messages of a given level of logging. * @brief Return the fitting output stream to print messages
* @param level Level of logging * of a given level of logging.
*
* @param[in] level Level of logging
* @return Output stream (stdout or stderr) * @return Output stream (stdout or stderr)
*/ */
constexpr auto getLogOutput(LogLevel level) { constexpr auto getLogOutput(LogLevel level) {
...@@ -35,8 +37,10 @@ namespace vkcv { ...@@ -35,8 +37,10 @@ namespace vkcv {
} }
/** /**
* Return the fitting identifier for messages of a given level of logging. * @brief Returns the fitting identifier for messages of
* @param level Level of logging * a given level of logging.
*
* @param[in] level Level of logging
* @return Identifier of the given level of logging * @return Identifier of the given level of logging
*/ */
constexpr const char* getLogName(LogLevel level) { constexpr const char* getLogName(LogLevel level) {
...@@ -63,8 +67,10 @@ namespace vkcv { ...@@ -63,8 +67,10 @@ namespace vkcv {
#endif #endif
/** /**
* Macro-function to log formatting messages with a specific level of logging. * @brief Macro-function to log formatting messages with
* @param level Level of logging * a specific level of logging.
*
* @param[in] level Level of logging
*/ */
#define vkcv_log(level, ...) { \ #define vkcv_log(level, ...) { \
char output_message [ \ char output_message [ \
...@@ -99,8 +105,10 @@ namespace vkcv { ...@@ -99,8 +105,10 @@ namespace vkcv {
#else #else
/** /**
* Macro-function to log formatting messages with a specific level of logging. * @brief Macro-function to log formatting messages with
* @param level Level of logging * a specific level of logging.
*
* @param[in] level Level of logging
*/ */
#define vkcv_log(level, ...) {} #define vkcv_log(level, ...) {}
#endif #endif
......
...@@ -34,7 +34,10 @@ namespace vkcv { ...@@ -34,7 +34,10 @@ namespace vkcv {
PushConstants& operator=(PushConstants&& other) = default; 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]] [[nodiscard]]
size_t getSizePerDrawcall() const { size_t getSizePerDrawcall() const {
...@@ -42,7 +45,10 @@ namespace vkcv { ...@@ -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]] [[nodiscard]]
size_t getFullSize() const { size_t getFullSize() const {
...@@ -50,7 +56,10 @@ namespace vkcv { ...@@ -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]] [[nodiscard]]
size_t getDrawcallCount() const { size_t getDrawcallCount() const {
...@@ -58,18 +67,20 @@ namespace vkcv { ...@@ -58,18 +67,20 @@ namespace vkcv {
} }
/** /**
* @brief Clear the drawcall data * @brief Clears the data for all drawcalls currently.
* stored.
*/ */
void clear() { void clear() {
m_data.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 * @tparam T Type of data (must match the size per drawcall)
* @param value Data to append * @param[in] value Data to append
* @return If operation was successfull * @return True, if operation was successfull, otherwise false
*/ */
template<typename T = uint8_t> template<typename T = uint8_t>
bool appendDrawcall(const T& value) { bool appendDrawcall(const T& value) {
...@@ -86,10 +97,11 @@ namespace vkcv { ...@@ -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 * @tparam T Type of data
* @param index Index of the drawcall data to return * @param[in] index Index of the drawcall
* @return Drawcall data * @return Drawcall data
*/ */
template<typename T = uint8_t> template<typename T = uint8_t>
...@@ -99,10 +111,11 @@ namespace vkcv { ...@@ -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 * @tparam T Type of data
* @param index Index of the drawcall data to return * @param[in] index Index of the drawcall
* @return Drawcall data * @return Drawcall data
*/ */
template<typename T = uint8_t> template<typename T = uint8_t>
...@@ -112,9 +125,10 @@ namespace vkcv { ...@@ -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 * @return Drawcall data
*/ */
[[nodiscard]] [[nodiscard]]
...@@ -124,9 +138,10 @@ namespace vkcv { ...@@ -124,9 +138,10 @@ namespace vkcv {
} }
/** /**
* @return Raw pointer to the entire drawcall data array, * @brief Returns the pointer to the entire drawcall data which
* might be nullptr if data is empty, * might be nullptr if the data is empty.
* pointer might be invalidated by clearing or adding data *
* @return Pointer to the data
*/ */
[[nodiscard]] [[nodiscard]]
const void* getData() const { const void* getData() const {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment