srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/src/platform/platform_factory.h
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2024-03-25 20:09:00 +0200
committersrdusr <[email protected]>2024-03-25 20:09:00 +0200
commit0ea49730db789f60349d49187fee2896a947646d (patch)
treeff1309a93bfc9f7a0440aff4dfcee088d1009433 /src/platform/platform_factory.h
parent1e1dc93c21a0ba994830bc463c3af1d3ac169fbb (diff)
downloadsrdwm-0ea49730db789f60349d49187fee2896a947646d.tar.gz
srdwm-0ea49730db789f60349d49187fee2896a947646d.zip
Initial Commit
Diffstat (limited to 'src/platform/platform_factory.h')
-rw-r--r--src/platform/platform_factory.h37
1 files changed, 37 insertions, 0 deletions
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 <memory>
+#include <string>
+#include <vector>
+
+// Platform factory for creating platform-specific implementations
+class PlatformFactory {
+public:
+ // Create platform with automatic detection
+ static std::unique_ptr<Platform> create_platform();
+
+ // Create specific platform by name
+ static std::unique_ptr<Platform> create_platform(const std::string& platform_name);
+
+ // Get list of available platforms
+ static std::vector<std::string> 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<Platform> detect_linux_platform();
+};
+
+#endif // SRDWM_PLATFORM_FACTORY_H
+
+