feat: Introduce a modular argument convention system for GNU and Windows styles, add .clang-format, and update CMake configuration to C++17.

This commit is contained in:
2026-03-15 22:55:23 +04:00
parent 061581c510
commit a1dc3c0149
20 changed files with 371 additions and 284 deletions

View File

@@ -0,0 +1,38 @@
#pragma once
#ifndef FAKE_PARSER_HPP
#define FAKE_PARSER_HPP
#include <argument_parser.hpp>
#include <initializer_list>
#include <string>
namespace argument_parser {
class fake_parser : public base_parser {
public:
fake_parser() = default;
fake_parser(std::string program_name, std::vector<std::string> const& arguments) {
this->program_name = std::move(program_name);
parsed_arguments = arguments;
}
fake_parser(std::string const& program_name, std::vector<std::string>&& arguments) {
this->program_name = program_name;
parsed_arguments = std::move(arguments);
}
fake_parser(std::string const& program_name, std::initializer_list<std::string> const& arguments) :
fake_parser(program_name, std::vector<std::string>(arguments)) {}
void set_program_name(std::string const& program_name) {
this->program_name = program_name;
}
void set_parsed_arguments(std::vector<std::string> const& parsed_arguments) {
this->parsed_arguments = parsed_arguments;
}
};
}
#endif