ArKanjo 0.5.1
A tool for find code duplicated functions in codebases
CommandBase< Derived > Class Template Reference

#include <command_base.hpp>

+ Inheritance diagram for CommandBase< Derived >:
+ Collaboration diagram for CommandBase< Derived >:

Public Member Functions

virtual void print_help (const std::string command_name, const OptionsCollector *collector) const
 
const CliOption * options () 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 const CliOption * options () const =0
 
virtual std::string_view description () const =0
 
virtual bool validate (const ParsedOptions &options)=0
 Validate the arguments already analyzed. More...
 
virtual bool run (const ParsedOptions &options)=0
 Executes the main logic of the command. More...
 
virtual bool do_run (const std::string command_name, const ParsedOptions &options, const OptionsCollector *collector=nullptr)=0
 

Detailed Description

template<typename Derived>
class CommandBase< Derived >

Definition at line 22 of file command_base.hpp.

Member Function Documentation

◆ do_run()

template<typename Derived >
bool CommandBase< Derived >::do_run ( const std::string  command_name,
const ParsedOptions &  options,
const OptionsCollector *  collector = nullptr 
)
overridevirtual

Implements ICommand.

Definition at line 105 of file command_base.hpp.

◆ options()

template<typename Derived >
const CliOption * CommandBase< Derived >::options ( ) const
finalvirtual

Implements ICommand.

Definition at line 97 of file command_base.hpp.

◆ print_help()

template<typename Derived >
virtual void CommandBase< Derived >::print_help ( const std::string  command_name,
const OptionsCollector *  collector 
) const
virtual

Definition at line 25 of file command_base.hpp.


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