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

Inclusive argument group. More...

#include <argument_group.h>

Inheritance diagram for cli::commands::InclusiveGroup:
cli::commands::ArgumentGroup

Public Member Functions

template<typename... Args>
requires ((!std::same_as<std::remove_cvref_t<Args>, InclusiveGroup> && ...) && (std::derived_from<std::remove_cvref_t<Args>, ArgumentBase> && ...))
 InclusiveGroup (Args &&...args)
 Construct a new InclusiveGroup.
 
- 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

Inclusive argument group.

Constructor & Destructor Documentation

◆ InclusiveGroup()

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

Construct a new InclusiveGroup.

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: