args 6.4.16
A simple single-header C++11 STL-only argument parser library
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
args::Base Class Reference

Base class for all match types. More...

#include <args.hxx>

Inheritance diagram for args::Base:
args::Group args::NamedBase args::Command args::GlobalOptions args::Subparser args::FlagBase args::PositionalBase args::ArgumentParser args::ActionFlag args::Flag args::NargsValueFlag< T, List, Reader > args::ValueFlagBase args::MapPositional< K, T, Reader, Map > args::MapPositionalList< K, T, List, Reader, Map > args::Positional< T, Reader > args::PositionalList< T, List, Reader >

Public Member Functions

 Base (const std::string &help_, Options options_={})
 
Options GetOptions () const noexcept
 
bool IsRequired () const noexcept
 
virtual bool Matched () const noexcept
 
virtual void Validate (const std::string &, const std::string &) const
 
 operator bool () const noexcept
 
virtual std::vector< std::tuple< std::string, std::string, unsigned > > GetDescription (const HelpParams &, const unsigned indentLevel) const
 
virtual std::vector< Command * > GetCommands ()
 
virtual bool IsGroup () const
 
virtual FlagBaseMatch (const EitherFlag &)
 
virtual PositionalBaseGetNextPositional ()
 
virtual std::vector< FlagBase * > GetAllFlags ()
 
virtual bool HasFlag () const
 
virtual bool HasPositional () const
 
virtual bool HasCommand () const
 
virtual std::vector< std::string > GetProgramLine (const HelpParams &) const
 
void KickOut (bool kickout_) noexcept
 Sets a kick-out value for building subparsers.
 
bool KickOut () const noexcept
 Gets the kick-out value for building subparsers.
 
virtual void Reset () noexcept
 

Protected Attributes

bool matched = false
 
const std::string help
 

Detailed Description

Base class for all match types.

Member Function Documentation

◆ GetNextPositional()

virtual PositionalBase * args::Base::GetNextPositional ( )
inlinevirtual

Reimplemented in args::Group, and args::Command.

◆ GetProgramLine()

virtual std::vector< std::string > args::Base::GetProgramLine ( const HelpParams ) const
inlinevirtual

Reimplemented in args::Group, and args::Command.

◆ HasCommand()

virtual bool args::Base::HasCommand ( ) const
inlinevirtual

Reimplemented in args::Group, and args::Command.

◆ HasFlag()

virtual bool args::Base::HasFlag ( ) const
inlinevirtual

Reimplemented in args::Group, and args::Command.

◆ HasPositional()

virtual bool args::Base::HasPositional ( ) const
inlinevirtual

Reimplemented in args::Group, and args::Command.

◆ Match()

virtual FlagBase * args::Base::Match ( const EitherFlag )
inlinevirtual

Reimplemented in args::Group, and args::Command.

◆ Matched()

virtual bool args::Base::Matched ( ) const
inlinevirtualnoexcept

Reimplemented in args::Group, and args::Command.


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