38 #ifndef PCL_CONSOLE_PARSE_H_ 39 #define PCL_CONSOLE_PARSE_H_ 43 #include <pcl/pcl_macros.h> 59 find_switch (
int argc,
char** argv,
const char* argument_name);
68 find_argument (
int argc,
char** argv,
const char* argument_name);
77 template<
typename Type>
int 78 parse (
int argc,
char** argv,
const char* argument_name, Type& value)
82 if (index > 0 && index < argc)
84 std::istringstream stream;
86 stream.str (argv[index]);
101 parse_argument (
int argc,
char** argv,
const char* str, std::string &val);
111 parse_argument (
int argc,
char** argv,
const char* str,
bool &val);
121 parse_argument (
int argc,
char** argv,
const char* str,
float &val);
131 parse_argument (
int argc,
char** argv,
const char* str,
double &val);
141 parse_argument (
int argc,
char** argv,
const char* str,
int &val);
151 parse_argument (
int argc,
char** argv,
const char* str,
unsigned int &val);
161 parse_argument (
int argc,
char** argv,
const char* str,
char &val);
174 parse_2x_arguments (
int argc,
char** argv,
const char* str,
float &f,
float &s,
bool debug =
true);
187 parse_2x_arguments (
int argc,
char** argv,
const char* str,
double &f,
double &s,
bool debug =
true);
200 parse_2x_arguments (
int argc,
char** argv,
const char* str,
int &f,
int &s,
bool debug =
true);
214 parse_3x_arguments (
int argc,
char** argv,
const char* str,
float &f,
float &s,
float &t,
bool debug =
true);
228 parse_3x_arguments (
int argc,
char** argv,
const char* str,
double &f,
double &s,
double &t,
bool debug =
true);
242 parse_3x_arguments (
int argc,
char** argv,
const char* str,
int &f,
int &s,
int &t,
bool debug =
true);
253 parse_x_arguments (
int argc,
char** argv,
const char* str, std::vector<double>& v);
264 parse_x_arguments (
int argc,
char** argv,
const char* str, std::vector<float>& v);
332 std::vector<double> &values_f,
333 std::vector<double> &values_s);
347 std::vector<double> &values_f,
348 std::vector<double> &values_s,
349 std::vector<double> &values_t);
357 PCL_EXPORTS std::vector<int>
362 #endif // PCL_CONSOLE_PARSE_H_ PCL_EXPORTS bool parse_multiple_3x_arguments(int argc, char **argv, const char *str, std::vector< double > &values_f, std::vector< double > &values_s, std::vector< double > &values_t)
Parse command line arguments for file names with given extension (multiple occurences of 3x argument ...
PCL_EXPORTS int find_argument(int argc, char **argv, const char *argument_name)
Finds the position of the argument with name "argument_name" in the argument list "argv".
int parse(int argc, char **argv, const char *argument_name, Type &value)
Template version for parsing arguments.
PCL_EXPORTS int parse_3x_arguments(int argc, char **argv, const char *str, float &f, float &s, float &t, bool debug=true)
Parse for specific given command line arguments (3x values comma separated).
PCL_EXPORTS int parse_2x_arguments(int argc, char **argv, const char *str, float &f, float &s, bool debug=true)
Parse for specific given command line arguments (2x values comma separated).
PCL_EXPORTS bool parse_multiple_2x_arguments(int argc, char **argv, const char *str, std::vector< double > &values_f, std::vector< double > &values_s)
Parse command line arguments for file names with given extension (multiple occurences of 2x argument ...
PCL_EXPORTS bool parse_multiple_arguments(int argc, char **argv, const char *str, std::vector< int > &values)
Parse for specific given command line arguments (multiple occurences of the same command line paramet...
PCL_EXPORTS int parse_x_arguments(int argc, char **argv, const char *str, std::vector< double > &v)
Parse for specific given command line arguments (3x values comma separated).
PCL_EXPORTS std::vector< int > parse_file_extension_argument(int argc, char **argv, const std::string &ext)
Parse command line arguments for file names with given extension.
PCL_EXPORTS bool find_switch(int argc, char **argv, const char *argument_name)
Finds whether the argument with name "argument_name" is in the argument list "argv".
PCL_EXPORTS int parse_argument(int argc, char **argv, const char *str, std::string &val)
Parse for a specific given command line argument.