Arkanjo 0.2
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
Help Class Reference

#include <help.hpp>

+ Inheritance diagram for Help:
+ Collaboration diagram for Help:

Public Member Functions

 Help (const std::vector< std::pair< std::vector< std::string >, CommandsRegistry::CommandFactory > > &commands)
 
 Help (const std::vector< std::pair< std::vector< std::string >, CommandsRegistry::CommandFactory > > &commands, const std::string command_name)
 
bool validate (const ParsedOptions &options) override
 Validate the arguments already analyzed.
 
bool run (const ParsedOptions &options) override
 Displays help information about available commands.
 
- Public Member Functions inherited from CommandBase< Help >
virtual void print_help (const std::string command_name, const OptionsCollector *collector) const
 
const CliOptionoptions () const final
 
bool do_run (const std::string command_name, const ParsedOptions &options, const OptionsCollector *collector=nullptr) override
 
- Public Member Functions inherited from ICommand
virtual ~ICommand ()=default
 
virtual std::string_view description () const =0
 

Detailed Description

Definition at line 19 of file help.hpp.

Constructor & Destructor Documentation

◆ Help() [1/2]

Help::Help ( const std::vector< std::pair< std::vector< std::string >, CommandsRegistry::CommandFactory > > & commands)
explicit

Definition at line 5 of file help.cpp.

◆ Help() [2/2]

Help::Help ( const std::vector< std::pair< std::vector< std::string >, CommandsRegistry::CommandFactory > > & commands,
const std::string command_name )
explicit

Definition at line 9 of file help.cpp.

Member Function Documentation

◆ run()

bool Help::run ( const ParsedOptions & options)
overridevirtual

Displays help information about available commands.

Implements ICommand.

Definition at line 18 of file help.cpp.

◆ validate()

bool Help::validate ( const ParsedOptions & options)
overridevirtual

Validate the arguments already analyzed.

Verify that all required options have been selected and that the values ​​provided are valid.

Parameters
optionsThe ParsedOptions structure will be populated with the arguments.
Returns
True if the arguments are valid, false otherwise.

Implements ICommand.

Definition at line 14 of file help.cpp.


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