MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / main

Function main

cp-profiler/src/main_cpprofiler.cpp:13–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include "cpprofiler/utils/debug.hh"
12
13int main(int argc, char *argv[])
14{
15
16 using namespace cpprofiler;
17
18#ifdef QT_OPENGL_SUPPORT
19 QGL::setPreferredPaintEngine(QPaintEngine::OpenGL);
20#endif
21
22 QApplication app(argc, argv);
23 QCoreApplication::setApplicationName("CP-Profiler");
24
25 CommandLineParser cl_parser;
26 cl_parser.process(app);
27
28 Options options;
29
30 {
31 if (cl_parser.isSet(cl_options::paths))
32 {
33 options.paths = cl_parser.value(cl_options::paths).toStdString();
34 print("selected paths file: {}", options.paths);
35 }
36
37 if (cl_parser.isSet(cl_options::mzn))
38 {
39 options.mzn = cl_parser.value(cl_options::mzn).toStdString();
40 print("selected mzn file: {}", options.mzn);
41 }
42 }
43
44 if (cl_parser.isSet(cl_options::save_search))
45 {
46 const auto path = cl_parser.value(cl_options::save_search).toStdString();
47 options.save_search_path = path;
48 }
49
50 if (cl_parser.isSet(cl_options::save_execution))
51 {
52 const auto path = cl_parser.value(cl_options::save_execution).toStdString();
53 options.save_execution_db = path;
54 }
55
56 if(cl_parser.isSet(cl_options::save_pixel_tree)) {
57 const auto path = cl_parser.value(cl_options::save_pixel_tree).toStdString();
58 options.save_pixel_tree_path = path;
59 }
60
61 if(cl_parser.isSet(cl_options::pixel_tree_compression)) {
62 QString cs = cl_parser.value(cl_options::pixel_tree_compression);
63 options.pixel_tree_compression = cs.toInt();
64 }
65
66 Conductor conductor(std::move(options));
67
68 conductor.show();
69
70 tests::execution::run(conductor);

Callers

nothing calls this directly

Calls 5

processMethod · 0.80
isSetMethod · 0.80
printFunction · 0.50
runFunction · 0.50
valueMethod · 0.45

Tested by

no test coverage detected