Arkanjo 0.2
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
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-formater"}, [&]() { return std::make_unique<BigCloneFormater>(&table); }},
28 {{"bigclone-evaluator"}, [&]() { return std::make_unique<BigCloneTailorEvaluator>(&table); }},
29 {{"help"}, [&]() { return std::make_unique<Help>(commands); }},
30 {{"preprocessor"}, [&]() { return nullptr; }}
31 };
32
33 return commands;
34 }
35} // namespace OrchestratorCommands
BigCloneEval format conversion interface.
BigCloneBench evaluation interface * Provides evaluation metrics compatible with BigCloneBench datase...
Code duplication reporting system.
Trie-based code duplication counter.
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.