From e4a0432383331e013808a97b7c24707e4ddc4726 Mon Sep 17 00:00:00 2001 From: srdusr Date: Fri, 26 Sep 2025 12:23:19 +0200 Subject: Initial Commit --- src/platform/platform_factory.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/platform/platform_factory.h (limited to 'src/platform/platform_factory.h') diff --git a/src/platform/platform_factory.h b/src/platform/platform_factory.h new file mode 100644 index 0000000..24f7586 --- /dev/null +++ b/src/platform/platform_factory.h @@ -0,0 +1,37 @@ +#ifndef SRDWM_PLATFORM_FACTORY_H +#define SRDWM_PLATFORM_FACTORY_H + +#include "platform.h" +#include +#include +#include + +// Platform factory for creating platform-specific implementations +class PlatformFactory { +public: + // Create platform with automatic detection + static std::unique_ptr create_platform(); + + // Create specific platform by name + static std::unique_ptr create_platform(const std::string& platform_name); + + // Get list of available platforms + static std::vector get_available_platforms(); + + // Get current platform name + static std::string get_current_platform(); + + // Check if platform is available + static bool is_platform_available(const std::string& platform_name); + + // Print platform information + static void print_platform_info(); + +private: + // Linux platform detection + static std::unique_ptr detect_linux_platform(); +}; + +#endif // SRDWM_PLATFORM_FACTORY_H + + -- cgit v1.2.3