17 std::set<std::string> m_flags;
18 std::set<char> m_aliases;
21 Option(
const std::string& flags,
const std::string& description);
22 [[nodiscard]]
auto flags()
const -> std::vector<std::string>;
25 [[nodiscard]]
auto format()
const -> std::string
override;
26 virtual void find(std::vector<std::string_view>& args)
const = 0;
32 std::function<void()> m_callback;
35 BasicOption(
const std::string& flags,
const std::string& description, std::function<
void()> callback);
36 void find(std::vector<std::string_view>& args)
const override;
42 std::function<void(std::string_view)> m_callback;
46 const std::string& description,
47 std::function<
void(std::string_view)> callback);
48 [[nodiscard]]
auto format()
const -> std::string
override;
49 void find(std::vector<std::string_view>& args)
const override;
Base type of all arguments.
Definition: Argument.hpp:13
Optional argument with a simple binary state.
Definition: Option.hpp:31
Base type of all optional arguments.
Definition: Option.hpp:16
Optional argument with an arbitrary value.
Definition: Option.hpp:41