feat: Introduce core argument parsing framework with platform-specific parsers, conventions, and type-based value parsing.

This commit is contained in:
2026-03-15 23:05:13 +04:00
parent a1dc3c0149
commit 7e2c09cbf9
10 changed files with 258 additions and 301 deletions

View File

@@ -3,23 +3,15 @@
#ifdef __linux__
#ifndef LINUX_PARSER_HPP
#define LINUX_PARSER_HPP
#include <fstream>
#include <string>
#include <argument_parser.hpp>
namespace argument_parser {
class linux_parser : public base_parser {
public:
linux_parser() {
std::ifstream command_line_file{"/proc/self/cmdline"};
std::getline(command_line_file, program_name, '\0');
for(std::string line; std::getline(command_line_file, line, '\0');) {
parsed_arguments.emplace_back(line);
}
}
};
}
class linux_parser : public base_parser {
public:
linux_parser();
};
} // namespace argument_parser
#endif
#endif
#endif