args-parser 6.3.6
Loading...
Searching...
No Matches
Args::Help Class Reference

Help argument. More...

#include <help.hpp>

Inheritance diagram for Args::Help:
Collaboration diagram for Args::Help:

Public Member Functions

 Help (bool throwExceptionOnPrint=true)
HelpsetExecutable (const String &exe)
 Set executable name.
HelpsetAppDescription (const String &desc)
 Set description for the application.
HelpsetLineLength (String::size_type length)
 Set line length for the help.
HelpsetPrinter (std::unique_ptr< HelpPrinterIface > p)
 Set printer.
Public Member Functions inherited from Args::Arg
template<typename T>
 Arg (Char flag, T &&name, bool isWithValue=false, bool isRequired=false)
 Construct argument with flag and name.
 Arg (Char flag, bool isWithValue=false, bool isRequired=false)
 Construct argument only with flag, without name.
template<typename T>
 Arg (T &&name, bool isWithValue=false, bool isRequired=false)
 Construct argument only with name, without flag.
virtual ~Arg ()
ArgType type () const override
String name () const override
bool isWithValue () const override
ArgsetWithValue (bool on=true)
 Set is this argument with value.
bool isRequired () const override
ArgsetRequired (bool on=true)
 Set required.
bool isDefined () const override
ArgsetDefined (bool on=true)
 Set defined.
virtual const Stringvalue () const
virtual ArgsetValue (const String &v)
 Set value.
const Stringflag () const override
ArgsetFlag (Char f)
 Set flag.
const StringargumentName () const override
ArgsetArgumentName (const String &name)
 Set argument name.
const StringvalueSpecifier () const override
ArgsetValueSpecifier (const String &vs)
 Set value specifier.
const Stringdescription () const override
ArgsetDescription (const String &desc)
 Set description.
const StringlongDescription () const override
ArgsetLongDescription (const String &desc)
 Set long description.
const StringdefaultValue () const override
virtual ArgsetDefaultValue (const String &v)
 Set default value.
bool isMisspelledName (const String &name, StringList &possibleNames) const override
void clear () override
 Clear state of the argument.
Public Member Functions inherited from Args::ArgIface
 ArgIface ()
virtual ~ArgIface ()
CmdLinecmdLine () const

Protected Member Functions

void process (Context &context) override
 Process argument's staff, for example take values from context.
void setCmdLine (CmdLine *cmdLine) override
 Set command line parser.
Protected Member Functions inherited from Args::Arg
ArgIfacefindArgument (const String &name) override
void checkCorrectnessBeforeParsing (StringList &flags, StringList &names) const override
 Check correctness of the argument before parsing.
void checkCorrectnessAfterParsing () const override
 Check correctness of the argument after parsing.

Detailed Description

Help argument.

Definition at line 49 of file help.hpp.

Constructor & Destructor Documentation

◆ Help()

Args::Help::Help ( bool throwExceptionOnPrint = true)
inlineexplicit

Definition at line 764 of file cmd_line.hpp.

Member Function Documentation

◆ process()

void Args::Help::process ( Context & context)
inlineoverrideprotectedvirtual

Process argument's staff, for example take values from context.

This method invokes exactly at that moment when parser has found this argument.

Parameters
contextContext of the command line.

Reimplemented from Args::Arg.

Definition at line 119 of file help.hpp.

◆ setAppDescription()

Help & Args::Help::setAppDescription ( const String & desc)
inline

Set description for the application.

Definition at line 101 of file help.hpp.

◆ setCmdLine()

void Args::Help::setCmdLine ( CmdLine * cmdLine)
inlineoverrideprotectedvirtual

Set command line parser.

Reimplemented from Args::ArgIface.

Definition at line 77 of file help.hpp.

◆ setExecutable()

Help & Args::Help::setExecutable ( const String & exe)
inline

Set executable name.

Definition at line 95 of file help.hpp.

◆ setLineLength()

Help & Args::Help::setLineLength ( String::size_type length)
inline

Set line length for the help.

Definition at line 107 of file help.hpp.

◆ setPrinter()

Help & Args::Help::setPrinter ( std::unique_ptr< HelpPrinterIface > p)
inline

Set printer.

Definition at line 113 of file help.hpp.


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