ArKanjo 0.5.1
A tool for find code duplicated functions in codebases
orchestrator_commands.hpp
Go to the documentation of this file.
1#pragma once
2
4
13
15 static constexpr const char* DEFAULT_COMMAND = "help";
16
17 template<typename Table>
18 using CommandMap = const std::vector<std::pair<std::vector<std::string>, CommandsRegistry::CommandFactory>>;
19
20 template<typename Table>
22 CommandMap<Table> commands = {
23 {{"explorer", "ex"}, [&]() { return std::make_unique<SimilarityExplorer>(&table); }},
24 {{"duplication", "du"}, [&]() { return std::make_unique<CounterDuplicationCode>(&table); }},
25 {{"function", "fu"}, [&]() { return std::make_unique<SimilarFunctionFinder>(&table); }},
26 {{"random"}, [&]() { return std::make_unique<RandomSelector>(&table); }},
27 {{"bigclone-evaluator"}, [&]() { return std::make_unique<BigCloneTailorEvaluator>(&table); }},
28 {{"git-diff"}, [&]() { return std::make_unique<GitDiffFunction>(&table); }},
29 {{"version"}, [&]() { return std::make_unique<Version>(&table); }},
30 {{"help"}, [&]() { return std::make_unique<Help>(commands); }},
31 {{"preprocessor"}, [&]() { return nullptr; }}
32 };
33
34 return commands;
35 }
36} // namespace OrchestratorCommands
BigCloneBench evaluation interface * Provides evaluation metrics compatible with BigCloneBench datase...
Code duplication reporting system.
std::function< std::unique_ptr< ICommand >()> CommandFactory
CommandMap< Table > create_internal_commands(Table &table)
const std::vector< std::pair< std::vector< std::string >, CommandsRegistry::CommandFactory > > CommandMap
Main command orchestration interface.
Random selection of similar code pairs.
Similar function locator interface.
Duplicate function exploration interface.
Defines the version command interface.