From 79c91c5f91245130dc2ac45660bea6b5517e22fc Mon Sep 17 00:00:00 2001 From: vovatrykoz Date: Tue, 24 Dec 2024 15:02:48 +0100 Subject: [PATCH] add comments to factory functions --- include/setup/Factory.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/include/setup/Factory.h b/include/setup/Factory.h index 9df5468..80df1ed 100644 --- a/include/setup/Factory.h +++ b/include/setup/Factory.h @@ -14,14 +14,55 @@ namespace factory { using namespace e2e::io; +/** + * @brief Creates a logger of the specified type. + * + * This function creates a logger based on the provided type, which + * must be derived from `ILogger`. Any necessary arguments to the + * constructor of the logger type can be passed directly into this function. + * + * @tparam LoggerType The type of the logger. Must inherit from `ILogger`. + * @tparam Args Any additional arguments for the logger constructor. + * @param args Arguments forwarded to the constructor of the logger type. + * @return A unique pointer to the created logger instance. + */ template std::unique_ptr makeLogger(Args... args) requires std::is_base_of_v; +/** + * @brief Creates a task instance reader of the specified type. + * + * This function creates a task instance reader based on the provided type, + * which must be derived from `ITaskInstanceReader`. Any arguments + * required for the constructor of the reader type can be passed directly into + * this function. + * + * @tparam TaskInstanceReaderType The type of the task instance reader. Must + * inherit from `ITaskInstanceReader`. + * @tparam Args Any additional arguments for the task instance reader + * constructor. + * @param args Arguments forwarded to the constructor of the task instance + * reader type. + * @return A unique pointer to the created task instance reader. + */ template std::unique_ptr makeTaskInstanceReader(Args... args) requires std::is_base_of_v; +/** + * @brief Creates a task reader of the specified type. + * + * This function creates a task reader based on the provided type, which must + * be derived from `ITaskReader`. Any necessary arguments for + * the constructor of the reader type can be passed directly into this function. + * + * @tparam TaskReaderType The type of the task reader. Must inherit from + * `ITaskReader`. + * @tparam Args Any additional arguments for the task reader constructor. + * @param args Arguments forwarded to the constructor of the task reader type. + * @return A unique pointer to the created task reader. + */ template std::unique_ptr makeTaskReader(Args... args) requires std::is_base_of_v;