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

Method parseArgs

dimbuilder/DimBuilder.cpp:98–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96} // unnamed namespace
97
98bool DimBuilder::parseArgs(int argc, char *argv[])
99{
100 ProgramArgs args;
101
102 args.add("input,i", "Filename of JSON specification of "
103 "dimensions", m_input).setPositional();
104 args.add("output,o", "Filename of output of C++ header representation of "
105 "provided JSON.", m_output).setPositional();
106 try
107 {
108 std::vector<std::string> s;
109 for (int i = 0; i < argc; ++i)
110 s.push_back(argv[i]);
111 args.parse(s);
112 }
113 catch (arg_error& err)
114 {
115 throw dimbuilder_error(err.what());
116 }
117 return true;
118}
119
120
121bool DimBuilder::execute()

Callers 1

mainFunction · 0.45

Calls 4

dimbuilder_errorClass · 0.85
addMethod · 0.45
parseMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected