10int main(
int argc,
char* argv[]) {
12 cfg.setDefaultConfig();
19 ctx.
command_name = (argc > 1) ? argv[1] : OrchestratorHelper::DEFAULT_COMMAND;
24 std::unique_ptr<ICommand> command;
43 orchestrator.
add_step([&similarity_table, &orchestrator, &command, &collector](
Context& ctx) {
63 std::cerr << e.what() <<
"\n";
65 }
catch (
const std::exception& e) {
66 std::cerr <<
"Unexpected error: " << e.what() <<
"\n";
Base class for CLI-related errors.
An error is thrown when an unknown command is passed.
static Config & config()
Gets the singleton configuration instance.
void add_options(const CliOption *long_opts)
Step make_parse_step(int argc, char *argv[])
Main command orchestrator.
void run_pipeline(Context &ctx)
Represents a similarity graph between functions (paths).
int main(int argc, char *argv[])
CommandMap< Table > create_internal_commands(Table &table)
Step setup_command_step(std::unique_ptr< ICommand > &command, const std::vector< std::pair< std::vector< std::string >, CommandsRegistry::CommandFactory > > &commands)
Step similarity_step(Similarity_Table &table)
constexpr CliOption global_long_opts[]
bool formatter_step(Context &ctx)
Step command_run_step(std::shared_ptr< ICommand > command, const OptionsCollector &collector)
Main command orchestration interface.
bool has(const std::string &name) const
Checks whether an option exists.
std::optional< std::string_view > get(const std::string &name) const
Returns the value of an option.
std::string program_name
Name of the program.
std::filesystem::path name_container
Name of the cache container.