koutil
Loading...
Searching...
No Matches
parser.h File Reference
#include "koutil/argparser/arg.h"
#include "koutil/argparser/subcommand.h"
#include <cassert>
#include <concepts>
#include <cstddef>
#include <span>
#include <string_view>
#include <utility>

Go to the source code of this file.

Classes

class  koutil::argparser::Parser< Ctx, UParser, Args, Cmds >
 Template class representing a parser. More...
 

Namespaces

namespace  koutil
 
namespace  koutil::argparser
 

Concepts

concept  koutil::argparser::parser
 Concept to check if a type is a parser.
 

Enumerations

enum class  koutil::argparser::ParseResult {
  koutil::argparser::OK , koutil::argparser::ERR , koutil::argparser::ERR_EMPTY_OPTION , koutil::argparser::ERR_UNKNOWN ,
  koutil::argparser::ERR_INVALID_VALUE , koutil::argparser::ERR_MISSING_VALUE
}
 Enum class representing possible parse results. More...
 

Functions

template<typename Ctx , parser< Ctx > UParser, are_arguments Args, are_commands Cmds>
constexpr auto koutil::argparser::make_parser (Ctx &ctx, Args &&args, Cmds &&commands)
 Creates a Parser object.
 
template<typename Ctx , parser< Ctx > UParser, are_arguments Args, are_commands Cmds>
ParseResult koutil::argparser::process_args (std::size_t argc, const char **argv, Ctx &ctx, Args &&args, Cmds &&commands)
 Processes the command-line arguments.