koutil
Loading...
Searching...
No Matches
koutil::argparser::SubcommandBase Struct Referenceabstract

Base class for subcommands. More...

#include <subcommand.h>

Inheritance diagram for koutil::argparser::SubcommandBase:
koutil::argparser::Subcommand< type::types< Args... >, type::types< Cmd... > >

Public Member Functions

constexpr SubcommandBase (std::string_view cmd_name)
 
virtual constexpr ~SubcommandBase ()=default
 
virtual constexpr const ArgumentsBaseget_args () const =0
 Gets the arguments of the subcommand.
 
virtual constexpr const CommandsBaseget_cmds () const =0
 Gets the commands of the subcommand.
 
constexpr bool operator== (std::string_view n) const
 

Public Attributes

std::string_view name
 

Detailed Description

Base class for subcommands.

Constructor & Destructor Documentation

◆ SubcommandBase()

koutil::argparser::SubcommandBase::SubcommandBase ( std::string_view cmd_name)
inlineconstexpr

◆ ~SubcommandBase()

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

Member Function Documentation

◆ get_args()

virtual constexpr const ArgumentsBase & koutil::argparser::SubcommandBase::get_args ( ) const
nodiscardconstexprpure virtual

Gets the arguments of the subcommand.

Returns
A reference to the arguments of the subcommand.

Implemented in koutil::argparser::Subcommand< type::types< Args... >, type::types< Cmd... > >.

◆ get_cmds()

virtual constexpr const CommandsBase & koutil::argparser::SubcommandBase::get_cmds ( ) const
nodiscardconstexprpure virtual

Gets the commands of the subcommand.

Returns
A reference to the commands of the subcommand.

Implemented in koutil::argparser::Subcommand< type::types< Args... >, type::types< Cmd... > >.

◆ operator==()

bool koutil::argparser::SubcommandBase::operator== ( std::string_view n) const
inlineconstexpr

Member Data Documentation

◆ name

std::string_view koutil::argparser::SubcommandBase::name

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