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();
39  std::string parseTestDir();
44  std::string parseSurveyPath();
49  std::string parseAssetsPath();
54  std::string parseOutputPath();
59  bool parseWriteWaveform();
64  bool parseCalcEchowidth();
69  std::string parseSeed();
75  std::size_t parseNJobs();
87  bool parseDisableLegNoise();
92  bool parseRebuildScene();
96  void parseLoggingVerbosity();
101  std::string parseLoggingOutputMode();
106  bool parseFullWaveNoise();
111  bool parseLasOutput();
116  bool parseZipOutput();
121  double parseLasScale();
128  bool parseUnzip(std::string *inputPath, std::string *outputPath);
136 
137 
138 private:
139  // *** PRIVATE ATTRIBUTES *** //
140  // ************************** //
145  int argc;
150  char **argv;
151 
152  // *** PRIVATE METHODS *** //
153  // *********************** //
159  int findIndexOfArgument(std::string&& arg);
160 };
bool parseDisableLegNoise()
Parse the disable leg noise flag from invocation arguments.
Definition: ArgumentsParser.cpp:83
bool parseWriteWaveform()
Parse the write waveform flag specification.
Definition: ArgumentsParser.cpp:55
bool parseFullWaveNoise()
Parse the full wave noise specification.
Definition: ArgumentsParser.cpp:115
std::string parseAssetsPath()
Parse the assets path from invocation arguments.
Definition: ArgumentsParser.cpp:34
std::string parseSeed()
Parse the seed for RandomnessGenerator from invocation arguments.
Definition: ArgumentsParser.cpp:63
void parseLoggingVerbosity()
Parse the verbosity level for logging from invocation arguments.
Definition: ArgumentsParser.cpp:91
bool parseFixedIncidenceAngle()
Parse the fixed incidence angle specification. When fixed incidence angle is requested, incidence angle for all primitives will be exactly 1.0.
Definition: ArgumentsParser.cpp:145
std::string parseTestDir()
Parse test directory specification (not necessary, default one will be relative path "data/test/") ...
Definition: ArgumentsParser.cpp:16
std::string parseOutputPath()
Parse the output path from invocation arguments.
Definition: ArgumentsParser.cpp:44
std::size_t parseNJobs()
Parse the number of jobs from invocation arguments.
Definition: ArgumentsParser.cpp:71
bool parseHelpRequest()
Parse help request argument if any (-h or –help)
Definition: ArgumentsParser.cpp:7
std::string parseSurveyPath()
Parse the survery path from invocation arguments.
Definition: ArgumentsParser.cpp:26
ArgumentsParser(int argc, char **argv)
Instantiate an ArgumentsParser.
Definition: ArgumentsParser.h:20
std::string parseLoggingOutputMode()
Parse the logging output mode from invocation arguments.
Definition: ArgumentsParser.cpp:109
bool parseLasOutput()
Parse the LAS output specification.
Definition: ArgumentsParser.cpp:119
bool parseTestRequest()
Parse test request argument if any (–test)
Definition: ArgumentsParser.cpp:12
bool parseUnzip(std::string *inputPath, std::string *outputPath)
Parse an unzip request for given input and output path.
Definition: ArgumentsParser.cpp:133
double parseLasScale()
Parse the scale factor to be used by the LasSyncFileWriter.
Definition: ArgumentsParser.cpp:127
int findIndexOfArgument(std::string &&arg)
Find the index of received argument.
Definition: ArgumentsParser.cpp:151
bool parseDisablePlatformNoise()
Parse the disable platform noise flag from invocation arguments.
Definition: ArgumentsParser.cpp:79
Parser for helios-plusplus invocation arguments.
Definition: ArgumentsParser.h:11
int argc
Number of arguments in array or arguments (argv)
Definition: ArgumentsParser.h:145
char ** argv
Array of arguments.
Definition: ArgumentsParser.h:150
bool parseCalcEchowidth()
Parse the calc echo width flag specification.
Definition: ArgumentsParser.cpp:59
bool parseRebuildScene()
Parse the rebuild scene flag from invocation arguments.
Definition: ArgumentsParser.cpp:87
bool parseZipOutput()
Parse the ZIP output specification.
Definition: ArgumentsParser.cpp:123