MCPcopy Create free account
hub / github.com/PDAL/PDAL / outputOptions

Method outputOptions

apps/pdal.cpp:199–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197
198
199void App::outputOptions(std::string const& stageName, std::ostream& strm)
200{
201 // Force plugin loading.
202 StageFactory f(false);
203
204 Stage* s = f.createStage(stageName);
205 if (!s)
206 {
207 std::cerr << "Unable to create stage " << stageName << "\n";
208 return;
209 }
210
211 ProgramArgs args;
212 s->addAllArgs(args);
213
214 if (!m_showJSON)
215 {
216 strm << stageName << " -- " << PluginManager<Stage>::link(stageName) <<
217 std::endl;
218 strm << headline << std::endl;
219
220 args.dump2(strm , 2, 6, headline.size());
221 }
222 else
223 {
224 std::ostringstream ostr;
225 args.dump3(ostr);
226
227 NL::json array;
228 try
229 {
230 array = NL::json::parse(ostr.str());
231 }
232 catch (NL::json::parse_error&)
233 {}
234
235 NL::json object = { stageName, array };
236 strm << object;
237 }
238}
239
240
241void App::outputOptions()

Callers

nothing calls this directly

Calls 7

createStageMethod · 0.80
addAllArgsMethod · 0.80
dump2Method · 0.80
dump3Method · 0.80
strMethod · 0.80
parseFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected