MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / PrintUsage

Method PrintUsage

Util/src/CommandLine.cpp:151–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void CommandLine::PrintUsage() {
152 for (auto &error: _errors) {
153 std::cerr << error << std::endl;
154 }
155 std::cerr << std::endl;
156
157 std::cerr << _usage << std::endl;
158 for (auto &target: _targets) {
159 std::cerr << util::format("{}:", target.first) << std::endl;
160 auto &options = target.second;
161 for (auto &it: options._shortMap) {
162 auto &shortName = it.first;
163 auto &name = it.second;
164 auto &option = options._args[name];
165
166 std::cerr << util::format("\t-{} --{}\n\t\t{}",
167 shortName, name, option.Description)
168 << std::endl;
169 std::cerr << std::endl;
170 }
171 }
172}

Callers 1

mainFunction · 0.80

Calls 1

formatFunction · 0.50

Tested by

no test coverage detected