cli11
Loading...
Searching...
No Matches
cli::option_already_added_t Class Referenceexport
module cli11

A name collided with one already registered. More...

Inheritance diagram for cli::option_already_added_t:
cli::detail::error_mixin_t< option_already_added_t, construction_error_t > cli::construction_error_t cli::detail::error_mixin_t< construction_error_t, error_t > cli::error_t

Public Member Functions

 option_already_added_t (const std::string &name)
 Constructs the error for a duplicated name.
Public Member Functions inherited from cli::detail::error_mixin_t< option_already_added_t, construction_error_t >
 error_mixin_t (std::string msg, exit_codes_t exit_code)
 Constructs the error, naming it from derived_t.
 error_mixin_t (std::string msg, int exit_code)
 Constructs the error, naming it from derived_t.
Public Member Functions inherited from cli::detail::error_mixin_t< construction_error_t, error_t >
 error_mixin_t (std::string msg, exit_codes_t exit_code)
 Constructs the error, naming it from derived_t.
 error_mixin_t (std::string msg, int exit_code)
 Constructs the error, naming it from derived_t.
Public Member Functions inherited from cli::error_t
auto get_exit_code () const -> int
 Returns the process exit code associated with this error.
auto get_name () const -> std::string
 Returns the short name of this error type.
 error_t (std::string name, std::string msg, int exit_code=static_cast< int >(exit_codes_t::base_class))
 Constructs an error with an explicit numeric exit code.
 error_t (std::string name, std::string msg, exit_codes_t exit_code)
 Constructs an error with an exit code drawn from exit_codes_t.

Static Public Member Functions

static auto requires_ (const std::string &name, const std::string &other) -> option_already_added_t
 A dependency was declared twice.
static auto excludes (const std::string &name, const std::string &other) -> option_already_added_t
 An exclusion was declared twice.

Static Public Attributes

static constexpr std::string_view error_type_name = "option_already_added"
 Short name reported by error_t::get_name.
Static Public Attributes inherited from cli::construction_error_t
static constexpr std::string_view error_type_name = "construction_error"
 Short name reported by error_t::get_name.

Additional Inherited Members

Protected Member Functions inherited from cli::detail::error_mixin_t< option_already_added_t, construction_error_t >
 error_mixin_t (std::string ename, std::string msg, int exit_code)
 Forwards an explicit type name, for further derivation.
 error_mixin_t (std::string ename, std::string msg, exit_codes_t exit_code)
 Forwards an explicit type name, for further derivation.
Protected Member Functions inherited from cli::detail::error_mixin_t< construction_error_t, error_t >
 error_mixin_t (std::string ename, std::string msg, int exit_code)
 Forwards an explicit type name, for further derivation.
 error_mixin_t (std::string ename, std::string msg, exit_codes_t exit_code)
 Forwards an explicit type name, for further derivation.

Detailed Description

A name collided with one already registered.

Constructor & Destructor Documentation

◆ option_already_added_t()

cli::option_already_added_t::option_already_added_t ( const std::string & name)
inlineexplicit

Constructs the error for a duplicated name.

Parameters
nameThe name that was already registered.

Member Function Documentation

◆ excludes()

auto cli::option_already_added_t::excludes ( const std::string & name,
const std::string & other ) -> option_already_added_t
inlinestaticnodiscard

An exclusion was declared twice.

Parameters
nameThe excluding option.
otherThe excluded option.
Returns
The constructed error.

◆ requires_()

auto cli::option_already_added_t::requires_ ( const std::string & name,
const std::string & other ) -> option_already_added_t
inlinestaticnodiscard

A dependency was declared twice.

Parameters
nameThe dependent option.
otherThe option it depends on.
Returns
The constructed error.
Note
Named requires_ because requires is a keyword.

The documentation for this class was generated from the following file:
  • /home/mccakit/desktop/repositories/cli11/src/error.cpp