koutil
Loading...
Searching...
No Matches
koutil::argparser::CommandsBase Class Referenceabstract

Base class for commands. More...

#include <subcommand.h>

Inheritance diagram for koutil::argparser::CommandsBase:
koutil::argparser::Commands< Cmd... > koutil::argparser::Commands< Cmd > koutil::argparser::Commands< Cmd >

Public Member Functions

virtual constexpr ~CommandsBase ()=default
 
virtual constexpr const SubcommandBasefind (std::string_view name) const =0
 Finds a subcommand by name.
 
virtual constexpr std::size_t size () const =0
 Gets the number of subcommands.
 

Detailed Description

Base class for commands.

Constructor & Destructor Documentation

◆ ~CommandsBase()

virtual constexpr koutil::argparser::CommandsBase::~CommandsBase ( )
constexprvirtualdefault

Member Function Documentation

◆ find()

virtual constexpr const SubcommandBase * koutil::argparser::CommandsBase::find ( std::string_view name) const
nodiscardconstexprpure virtual

Finds a subcommand by name.

Parameters
nameThe name of the subcommand to find.
Returns
A pointer to the found subcommand, or nullptr if not found.

Implemented in koutil::argparser::Commands< Cmd >, koutil::argparser::Commands< Cmd >, and koutil::argparser::Commands< Cmd... >.

◆ size()

virtual constexpr std::size_t koutil::argparser::CommandsBase::size ( ) const
nodiscardconstexprpure virtual

Gets the number of subcommands.

Returns
The number of subcommands.

Implemented in koutil::argparser::Commands< Cmd >, koutil::argparser::Commands< Cmd >, and koutil::argparser::Commands< Cmd... >.


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