MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / main

Function main

docs/OptionDocumentationGenerator.cpp:46–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46int main()
47{
48#define INSIGHTS_OPT(opt, name, deflt, description, category) CreateFile(opt, deflt, description);
49#include "../InsightsOptions.def"
50
51#undef INSIGHTS_OPT
52
53 ofstream mdFile{"CommandLineOptions.md"};
54
55 if(not mdFile.is_open()) {
56 return -1;
57 }
58
59 mdFile << "# C++ Insights command line options {#command_line_options}\n\n";
60
61 std::vector<std::string> options{};
62
63#define INSIGHTS_OPT(opt, name, deflt, description, category) options.emplace_back(opt);
64#include "../InsightsOptions.def"
65
66 sort(options.begin(), options.end());
67
68 for(const auto& opt : options) {
69 std::string linkName{opt};
70 std::replace(linkName.begin(), linkName.end(), '-', '_');
71
72 //* [alt-syntax-for](@ref alt_syntax_for)
73 mdFile << "* [" << opt << "](@ref " << linkName << ")\n";
74 }
75}

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected