Xteink-X4-crosspoint-reader/lib/ThemeEngine/include/IniParser.h
Brackyt e16ce04cdc refactor: Enhance Bitmap handling and introduce ThemeEngine
## Summary

- Refactored Bitmap class to improve memory management and streamline methods.
- Introduced ThemeEngine with foundational classes for UI elements, layout management, and theme parsing.
- Added support for dynamic themes and improved rendering capabilities in the HomeActivity and settings screens.

This update lays the groundwork for a more flexible theming system, allowing for easier customization and management of UI elements across the application.
2026-01-25 01:39:08 +01:00

41 lines
864 B
C++

#pragma once
#include <map>
#include <string>
#include <vector>
// Forward declaration for FS file or stream if needed,
// but for now we'll take a string buffer or filename to keep it generic?
// Or better, depend on FS.h to read files directly.
#ifdef FILE_READ
#undef FILE_READ
#endif
#ifdef FILE_WRITE
#undef FILE_WRITE
#endif
#include <FS.h>
namespace ThemeEngine {
struct IniSection {
std::string name;
std::map<std::string, std::string> properties;
};
class IniParser {
public:
// Parse a stream (File, Serial, etc.)
static std::map<std::string, std::map<std::string, std::string>>
parse(Stream &stream);
// Parse a string buffer (useful for testing)
static std::map<std::string, std::map<std::string, std::string>>
parseString(const std::string &content);
private:
static void trim(std::string &s);
};
} // namespace ThemeEngine