MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / DetectHelpMode

Function DetectHelpMode

engine/Poseidon/Foundation/Platform/AppConfig.cpp:138–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136 return false;
137}
138
139CliHelpMode DetectHelpMode(const std::vector<std::string>& args)
140{
141 bool helpRequested = false;
142 bool fullHelpRequested = false;
143 bool devRequested = false;
144
145 for (const std::string& arg : args)
146 {
147 if (IsCliArg(arg, "--help"))
148 helpRequested = true;
149 else if (IsCliArg(arg, "--help-full"))
150 fullHelpRequested = true;
151 else if (IsCliArg(arg, "--dev"))
152 devRequested = true;
153 }
154
155 if ((helpRequested || fullHelpRequested) && devRequested)
156 return CliHelpMode::Dev;
157 if (fullHelpRequested)
158 return CliHelpMode::Full;
159 return CliHelpMode::Basic;
160}
161
162bool ContainsCliArg(const std::vector<std::string>& args, const char* name)

Callers 1

ParseCommandLineMethod · 0.85

Calls 1

IsCliArgFunction · 0.85

Tested by

no test coverage detected