mirror of
https://github.com/sametersoylu/argument-parser.git
synced 2026-05-28 20:08:10 +00:00
Add should_exit support for v2 parsers
- Add should_exit support to v2 platform parsers - Introduce macros.h and integrate trait hints - Wire CMake packaging with config, version, and install dirs - Update parser traits to include validation hooks and fixes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "parser_v2.hpp"
|
||||
#ifndef FAKE_PARSER_HPP
|
||||
#define FAKE_PARSER_HPP
|
||||
|
||||
@@ -18,6 +19,19 @@ namespace argument_parser {
|
||||
void set_program_name(std::string const &program_name);
|
||||
void set_parsed_arguments(std::vector<std::string> const &parsed_arguments);
|
||||
};
|
||||
|
||||
namespace v2 {
|
||||
class fake_parser : public argument_parser::v2::base_parser {
|
||||
public:
|
||||
fake_parser() = default;
|
||||
fake_parser(std::string program_name, std::vector<std::string> const &arguments);
|
||||
fake_parser(std::string const &program_name, std::vector<std::string> &&arguments);
|
||||
fake_parser(std::string const &program_name, std::initializer_list<std::string> const &arguments);
|
||||
|
||||
void set_program_name(std::string const &program_name);
|
||||
void set_parsed_arguments(std::vector<std::string> const &parsed_arguments);
|
||||
};
|
||||
}
|
||||
} // namespace argument_parser
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user