FE 0.13.1
Header-only C++ frontend library
Loading...
Searching...
No Matches
cli.h File Reference
#include <charconv>
#include <cstddef>
#include <format>
#include <functional>
#include <limits>
#include <optional>
#include <ostream>
#include <string>
#include <string_view>
#include <type_traits>
#include <vector>
Include dependency graph for cli.h:

Go to the source code of this file.

Classes

struct  fe::cli::Group
 Starts a new section in the help output; see fe::cli::group. More...
class  fe::cli::Opt
 One option or positional argument; build one with fe::cli::opt, fe::cli::arg, or fe::cli::help. More...
class  fe::cli::Cli
 Holds the Opts, parses argc/argv, and renders the help. More...

Namespaces

namespace  fe
namespace  fe::cli
 A small command-line parser for a single command - no subcommands.

Functions

template<class T>
Opt fe::cli::opt (T &target)
 A flag: sets target to true - or invokes it with true - each time it occurs.
template<class T>
Opt fe::cli::opt (T &target, std::string hint)
 An option that takes a value; hint names it in the help as <hint>.
template<class T>
Opt fe::cli::arg (T &target, std::string hint)
 A positional argument; hint names it in the help as <hint>.
Group fe::cli::group (std::string name)
 Opens a section named name that all following Cli options are listed under.
Opt fe::cli::help (bool &target)
 The -h/--help flag; chain ["-?"] to give it further names.

Class Documentation

◆ fe::cli::Group

struct fe::cli::Group

Starts a new section in the help output; see fe::cli::group.

Definition at line 55 of file cli.h.

Class Members
string name