From 6132d2c6a751ebffc29f950ca3755a05595dd99e Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 19 Nov 2025 09:18:08 +0100 Subject: feat: new documented codebase and improvements. Signed-off-by: Amlal El Mahrouss --- dev/BuildKit/Defines.h | 8 ++++++-- dev/BuildKit/IManifestBuilder.h | 24 ++++++++++++++++-------- dev/BuildKit/Imports.h | 4 ++++ dev/BuildKit/JSONManifestBuilder.h | 18 ++++++++++++------ dev/BuildKit/TOMLManifestBuilder.h | 18 ++++++++++++------ 5 files changed, 50 insertions(+), 22 deletions(-) (limited to 'dev/BuildKit') diff --git a/dev/BuildKit/Defines.h b/dev/BuildKit/Defines.h index 4774c85..1c88ceb 100644 --- a/dev/BuildKit/Defines.h +++ b/dev/BuildKit/Defines.h @@ -7,12 +7,16 @@ #include +/// =========================================================== /// +/// @brief Defines file +/// =========================================================== /// + #define LIKELY(ARG) ((ARG) ? assert(false) : ((void) 0)) #define UNLIKELY(ARG) LIKELY(!(ARG)) -#define LIBNEBUILD_VERSION "v0.0.1-libNeBuild" +#define LIBNEBUILD_VERSION "v0.0.7-buildkit" -#define LIBNEBUILD_VERSION_BCD 0x0001 +#define LIBNEBUILD_VERSION_BCD 0x0007 #define LIBNEBUILD_VERSION_MAJOR 1 #define LIBNEBUILD_VERSION_MINOR 1 diff --git a/dev/BuildKit/IManifestBuilder.h b/dev/BuildKit/IManifestBuilder.h index 8f9b2cf..abb389f 100644 --- a/dev/BuildKit/IManifestBuilder.h +++ b/dev/BuildKit/IManifestBuilder.h @@ -7,11 +7,13 @@ #include -#define NEBUILD_MANIFEST_BUILDER : public NeBuild::IManifestBuilder +#define NEBUILD_MANIFEST_BUILDER : public ::NeBuild::IManifestBuilder namespace NeBuild { +/// =========================================================== /// /// @brief Builder interface class. /// @note This class is meant to be used as an interface. +/// =========================================================== /// class IManifestBuilder { public: IManifestBuilder() = default; @@ -20,12 +22,18 @@ class IManifestBuilder { IManifestBuilder& operator=(const IManifestBuilder&) = default; IManifestBuilder(const IManifestBuilder&) = default; - /// @brief Builds a target using the implemented laguage. - /// @param arg_sz filename size - /// @param arg_val filename path. - /// @retval true succeeded. - /// @retval false failed. - virtual bool BuildTarget(const std::string& arg, const bool dry_run = false) = 0; - virtual const char* BuildSystem() = 0; + /// =========================================================== /// + /// @brief Builds a TOML target from a file. + /// @param arg_sz filename size (must be 1 or greater). + /// @param arg_val filename path (must be a valid language file). + /// @retval true building has succeeded. + /// @retval false fail to build, see error message. + /// =========================================================== /// + virtual bool BuildTarget(const std::string& arg, const bool dry_run = false) = 0; + + /// =========================================================== /// + /// @brief Returns the build system name. + /// =========================================================== /// + virtual const char* BuildSystem() = 0; }; } // namespace NeBuild \ No newline at end of file diff --git a/dev/BuildKit/Imports.h b/dev/BuildKit/Imports.h index e22c933..33e1e31 100644 --- a/dev/BuildKit/Imports.h +++ b/dev/BuildKit/Imports.h @@ -6,6 +6,10 @@ #ifndef NEBUILD_INCLUDES_H #define NEBUILD_INCLUDES_H +/// =========================================================== /// +/// @brief Imports file +/// =========================================================== /// + #include #include #include diff --git a/dev/BuildKit/JSONManifestBuilder.h b/dev/BuildKit/JSONManifestBuilder.h index 81643e3..438bdab 100644 --- a/dev/BuildKit/JSONManifestBuilder.h +++ b/dev/BuildKit/JSONManifestBuilder.h @@ -22,12 +22,18 @@ class JSONManifestBuilder final NEBUILD_MANIFEST_BUILDER { JSONManifestBuilder(const JSONManifestBuilder&) = default; public: - /// @brief Builds a JSON target. - /// @param arg_sz filename size - /// @param arg_val filename path. - /// @retval true build succeeded. - /// @retval false failed to build. - bool BuildTarget(const std::string& arg_val, const bool dry_run = false) override; + /// =========================================================== /// + /// @brief Builds a JSON target from a JSON file. + /// @param arg_sz filename size (must be 1 or greater). + /// @param arg_val filename path (must be a valid JSON file). + /// @retval true building has succeeded. + /// @retval false fail to build, see error message. + /// =========================================================== /// + bool BuildTarget(const std::string& arg_val, const bool dry_run = false) override; + + /// =========================================================== /// + /// @brief Returns the build system name. + /// =========================================================== /// const char* BuildSystem() override; }; } // namespace NeBuild \ No newline at end of file diff --git a/dev/BuildKit/TOMLManifestBuilder.h b/dev/BuildKit/TOMLManifestBuilder.h index 6baa9f5..7c508fc 100644 --- a/dev/BuildKit/TOMLManifestBuilder.h +++ b/dev/BuildKit/TOMLManifestBuilder.h @@ -22,12 +22,18 @@ class TOMLManifestBuilder final NEBUILD_MANIFEST_BUILDER { TOMLManifestBuilder(const TOMLManifestBuilder&) = default; public: - /// @brief Builds a TOML target. - /// @param arg_sz filename size - /// @param arg_val filename path. - /// @retval true build succeeded. - /// @retval false failed to build. - bool BuildTarget(const std::string& arg_val, const bool dry_run = false) override; + /// =========================================================== /// + /// @brief Builds a TOML target from a TOML file. + /// @param arg_sz filename size (must be 1 or greater). + /// @param arg_val filename path (must be a valid TOML file). + /// @retval true building has succeeded. + /// @retval false fail to build, see error message. + /// =========================================================== /// + bool BuildTarget(const std::string& arg_val, const bool dry_run = false) override; + + /// =========================================================== /// + /// @brief Returns the build system name. + /// =========================================================== /// const char* BuildSystem() override; }; } // namespace NeBuild \ No newline at end of file -- cgit v1.2.3