CPP-ARGON 4.0.1
Command-Line Argument Parser for C++20
Loading...
Searching...
No Matches
argument_base.hpp
Go to the documentation of this file.
1// Copyright (c) 2023-2026 Jakub Musiał
2// This file is part of the CPP-ARGON project (https://github.com/SpectraL519/cpp-argon).
3// Licensed under the MIT License. See the LICENSE file in the project root for full license information.
4
10#pragma once
11
14
15#include <any>
16#include <iostream>
17#include <vector>
18
19namespace argon {
20
21class argument_parser;
22
23namespace detail {
24
97
98} // namespace detail
99} // namespace argon
Argument class interface.
virtual bool is_required() const noexcept=0
virtual const std::vector< std::any > & values() const =0
virtual bool suppresses_group_checks() const noexcept=0
virtual const argument_name & name() const noexcept=0
virtual bool is_optional() const noexcept=0
virtual bool has_predefined_values() const noexcept=0
virtual ~argument_base()=default
friend class ::argon::argument_parser
virtual const std::any & value() const =0
virtual bool set_value(const std::string &value)=0
Set the value for the argument.
virtual bool is_hidden() const noexcept=0
virtual bool suppresses_arg_checks() const noexcept=0
virtual bool is_greedy() const noexcept=0
virtual std::weak_ordering nvalues_ordering() const noexcept=0
virtual bool has_value() const noexcept=0
virtual bool mark_used()=0
Mark the argument as used.
virtual bool has_parsed_values() const noexcept=0
virtual std::size_t count() const noexcept=0
virtual const std::optional< std::string > & help() const noexcept=0
virtual bool is_used() const noexcept=0
virtual bool is_positional() const noexcept=0
A help message builder class.
Defines structures for creating and formatting help messages.
Structure holding the argument's name.