Helios++
Helios software for LiDAR simulations
ArgumentsParser.h
1 #pragma once
2 
3 #include <string>
4 #include <logging.hpp>
5 
12 public:
13  // *** CONSTRUCTOR *** //
14  // ******************* //
20  ArgumentsParser(int argc, char **argv) : argc(argc), argv(argv) {}
21 
22  // *** PUBLIC METHODS *** //
23  // ********************** //
28  bool parseHelpRequest();
33  bool parseTestRequest();
38  bool parseVersionRequest();
44  std::string parseTestDir();
49  std::string parseDemoRequest();
54  std::string parseDemoSurveyPath();
59  std::string parseDemoAssetsPath();
64  std::string parseSurveyPath();
69  std::string parseAssetsPath();
74  std::string parseOutputPath();
79  bool parseWriteWaveform();
84  bool parseCalcEchowidth();
89  std::string parseSeed();
101  std::size_t parseNJobs();
108  int parseChunkSize();
115  int parseWarehouseFactor();
127  bool parseDisableLegNoise();
132  bool parseRebuildScene();
136  void parseLoggingVerbosity();
141  std::string parseLoggingOutputMode();
146  bool parseFullWaveNoise();
151  bool parseLasOutput();
156  bool parseLas10();
161  bool parseZipOutput();
166  double parseLasScale();
173  bool parseUnzip(std::string *inputPath, std::string *outputPath);
189  std::string parseGpsStartTime();
205  int parseKDTreeType();
217  size_t parseKDTreeJobs();
232  size_t parseKDTreeGeometricJobs();
243  size_t parseSAHLossNodes();
251  bool parseSplitByChannel();
252 
253 
254 private:
255  // *** PRIVATE ATTRIBUTES *** //
256  // ************************** //
261  int argc;
266  char **argv;
267 
268  // *** PRIVATE METHODS *** //
269  // *********************** //
275  int findIndexOfArgument(std::string&& arg);
276 };
Parser for helios-plusplus invocation arguments.
Definition: ArgumentsParser.h:11
bool parseFullWaveNoise()
Parse the full wave noise specification.
Definition: ArgumentsParser.cpp:156
bool parseDisablePlatformNoise()
Parse the disable platform noise flag from invocation arguments.
Definition: ArgumentsParser.cpp:119
char ** argv
Array of arguments.
Definition: ArgumentsParser.h:266
int argc
Number of arguments in array or arguments (argv)
Definition: ArgumentsParser.h:261
std::string parseSurveyPath()
Parse the survey path from invocation arguments.
Definition: ArgumentsParser.cpp:48
bool parseZipOutput()
Parse the ZIP output specification.
Definition: ArgumentsParser.cpp:168
void parseLoggingVerbosity()
Parse the verbosity level for logging from invocation arguments.
Definition: ArgumentsParser.cpp:131
std::string parseAssetsPath()
Parse the assets path from invocation arguments.
Definition: ArgumentsParser.cpp:56
size_t parseSAHLossNodes()
Parse on how many nodes the loss function of the surface area heuristic must be evaluated when buildi...
Definition: ArgumentsParser.cpp:218
bool parseFixedIncidenceAngle()
Parse the fixed incidence angle specification. When fixed incidence angle is requested,...
Definition: ArgumentsParser.cpp:190
int parseChunkSize()
Parse the chunk size for the pulse task dropper from invocation arguments.
Definition: ArgumentsParser.cpp:107
std::string parseDemoAssetsPath()
Parse the demo assets path from invocation arguments.
Definition: ArgumentsParser.cpp:42
size_t parseKDTreeGeometricJobs()
Parse how many KDTree geometry-level jobs must be used to build the KDTree upper nodes.
Definition: ArgumentsParser.cpp:212
int parseKDTreeType()
Parse the type of KDTree.
Definition: ArgumentsParser.cpp:200
bool parseTestRequest()
Parse test request argument if any (–test)
Definition: ArgumentsParser.cpp:12
int findIndexOfArgument(std::string &&arg)
Find the index of received argument.
Definition: ArgumentsParser.cpp:230
bool parseLasOutput()
Parse the LAS output specification.
Definition: ArgumentsParser.cpp:160
bool parseDisableLegNoise()
Parse the disable leg noise flag from invocation arguments.
Definition: ArgumentsParser.cpp:123
bool parseSplitByChannel()
Parse whether the output point clouds must be exported on a different file per channel or not.
Definition: ArgumentsParser.cpp:224
std::string parseDemoSurveyPath()
Parse the demo survey path from invocation arguments.
Definition: ArgumentsParser.cpp:36
bool parseVersionRequest()
Parse version request argument if any (–version)
Definition: ArgumentsParser.cpp:16
std::string parseTestDir()
Parse test directory specification (not necessary, default one will be relative path "data/test/")
Definition: ArgumentsParser.cpp:20
std::string parseSeed()
Parse the seed for RandomnessGenerator from invocation arguments.
Definition: ArgumentsParser.cpp:85
bool parseRebuildScene()
Parse the rebuild scene flag from invocation arguments.
Definition: ArgumentsParser.cpp:127
size_t parseKDTreeJobs()
Parse how many KDTree jobs must be used to build the KDTree.
Definition: ArgumentsParser.cpp:206
std::string parseGpsStartTime()
Parse the fixed GPS time start for Simulation.
Definition: ArgumentsParser.cpp:194
ArgumentsParser(int argc, char **argv)
Instantiate an ArgumentsParser.
Definition: ArgumentsParser.h:20
std::string parseOutputPath()
Parse the output path from invocation arguments.
Definition: ArgumentsParser.cpp:66
int parseWarehouseFactor()
Parse the warehouse factor for the warehouse based parallelization strategy from invocation arguments...
Definition: ArgumentsParser.cpp:113
int parseParallelizationStrategy()
Parse the parallelization strategy from invocation arguments.
Definition: ArgumentsParser.cpp:93
bool parseHelpRequest()
Parse help request argument if any (-h or –help)
Definition: ArgumentsParser.cpp:7
double parseLasScale()
Parse the scale factor to be used by the LasSyncFileWriter.
Definition: ArgumentsParser.cpp:172
std::string parseLoggingOutputMode()
Parse the logging output mode from invocation arguments.
Definition: ArgumentsParser.cpp:150
bool parseUnzip(std::string *inputPath, std::string *outputPath)
Parse an unzip request for given input and output path.
Definition: ArgumentsParser.cpp:178
bool parseCalcEchowidth()
Parse the calc echo width flag specification.
Definition: ArgumentsParser.cpp:81
bool parseLas10()
Parse the LAS version output specification.
Definition: ArgumentsParser.cpp:164
bool parseWriteWaveform()
Parse the write waveform flag specification.
Definition: ArgumentsParser.cpp:77
std::size_t parseNJobs()
Parse the number of jobs from invocation arguments.
Definition: ArgumentsParser.cpp:99
std::string parseDemoRequest()
Parse demo request argument if any (–demo)
Definition: ArgumentsParser.cpp:30