ChainCLI
A modern C++20 command-line interface library
Loading...
Searching...
No Matches
cli::commands::ExclusiveGroup Class Reference

Exclusive argument group. More...

#include <argument_group.h>

Inheritance diagram for cli::commands::ExclusiveGroup:
cli::commands::ArgumentGroup

Public Member Functions

template<typename... Args>
requires ((!std::same_as<std::remove_cvref_t<Args>, ExclusiveGroup> && ...) && (std::derived_from<std::remove_cvref_t<Args>, ArgumentBase> && ...))
 ExclusiveGroup (Args &&...args)
 Construct a new ExclusiveGroup.
 
- Public Member Functions inherited from cli::commands::ArgumentGroup
template<typename... Args>
requires ((!std::same_as<std::remove_cvref_t<Args>, ArgumentGroup> && ...) && (std::derived_from<std::remove_cvref_t<Args>, ArgumentBase> && ...))
 ArgumentGroup (bool exclusive, bool inclusive, Args &&...args)
 Construct a new ArgumentGroup.
 
const std::vector< std::shared_ptr< ArgumentBase > > & getArguments () const noexcept
 Get the arguments in the group.
 
bool isExclusive () const noexcept
 Check if the group is exclusive.
 
bool isInclusive () const noexcept
 Check if the group is inclusive.
 
bool isRequired () const
 Check if this group is required.
 
void addArgument (const std::shared_ptr< ArgumentBase > &arg)
 Add an argument to the group.
 

Detailed Description

Exclusive argument group.

Constructor & Destructor Documentation

◆ ExclusiveGroup()

template<typename... Args>
requires ((!std::same_as<std::remove_cvref_t<Args>, ExclusiveGroup> && ...) && (std::derived_from<std::remove_cvref_t<Args>, ArgumentBase> && ...))
cli::commands::ExclusiveGroup::ExclusiveGroup ( Args &&...  args)
inlineexplicit

Construct a new ExclusiveGroup.

Template Parameters
...ArgsThe types of the arguments to include in the group.
Parameters
...argsThe arguments to include in the group.

The documentation for this class was generated from the following file: