mirror of
https://github.com/sametersoylu/argument-parser.git
synced 2026-04-13 03:41:18 +00:00
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
#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 |