mirror of
https://github.com/sametersoylu/argument-parser.git
synced 2026-05-28 11:58:12 +00:00
- 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
38 lines
1.2 KiB
C++
38 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "parser_v2.hpp"
|
|
#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);
|
|
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 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
|