|
Arkanjo 0.2
A tool for find code duplicated functions in codebases
|
Basic interface for all CLI commands. More...
#include <command.hpp>
Inheritance diagram for ICommand:Public Member Functions | |
| 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. | |
| virtual bool | run (const ParsedOptions &options)=0 |
| Executes the main logic of the command. | |
| virtual bool | do_run (const std::string command_name, const ParsedOptions &options, const OptionsCollector *collector=nullptr)=0 |
Basic interface for all CLI commands.
The ICommand interface defines the minimum structure that a command must implement to be executed by the command-line system.
Definition at line 11 of file command.hpp.
|
virtualdefault |
|
pure virtual |
|
pure virtual |
Implemented in CommandBase< Derived >, CommandBase< BigCloneFormater >, CommandBase< BigCloneTailorEvaluator >, CommandBase< CounterDuplicationCode >, CommandBase< Help >, CommandBase< PreprocessorBuild >, CommandBase< PreprocessorList >, CommandBase< RandomSelector >, CommandBase< SimilarFunctionFinder >, and CommandBase< SimilarityExplorer >.
|
pure virtual |
Implemented in CommandBase< Derived >, CommandBase< BigCloneFormater >, CommandBase< BigCloneTailorEvaluator >, CommandBase< CounterDuplicationCode >, CommandBase< Help >, CommandBase< PreprocessorBuild >, CommandBase< PreprocessorList >, CommandBase< RandomSelector >, CommandBase< SimilarFunctionFinder >, and CommandBase< SimilarityExplorer >.
|
pure virtual |
Executes the main logic of the command.
You must use the validated arguments to perform the action desired by the command.
| options | The ParsedOptions structure will be populated with the arguments. |
Implemented in BigCloneFormater, BigCloneTailorEvaluator, CounterDuplicationCode, Help, PreprocessorBuild, PreprocessorList, RandomSelector, SimilarFunctionFinder, and SimilarityExplorer.
|
pure virtual |
Validate the arguments already analyzed.
Verify that all required options have been selected and that the values provided are valid.
| options | The ParsedOptions structure will be populated with the arguments. |
Implemented in BigCloneFormater, BigCloneTailorEvaluator, CounterDuplicationCode, Help, PreprocessorBuild, PreprocessorList, RandomSelector, SimilarFunctionFinder, and SimilarityExplorer.