Classes | |
class | TicToc |
Enumerations | |
enum | TT_ATTIBUTES { TT_RESET = 0, TT_BRIGHT = 1, TT_DIM = 2, TT_UNDERLINE = 3, TT_BLINK = 4, TT_REVERSE = 7, TT_HIDDEN = 8 } |
enum | TT_COLORS { TT_BLACK, TT_RED, TT_GREEN, TT_YELLOW, TT_BLUE, TT_MAGENTA, TT_CYAN, TT_WHITE } |
enum | VERBOSITY_LEVEL { L_ALWAYS, L_ERROR, L_WARN, L_INFO, L_DEBUG, L_VERBOSE } |
Functions | |
PCL_EXPORTS void | change_text_color (FILE *stream, int attribute, int fg, int bg) |
Change the text color (on either stdout or stderr) with an attr:fg:bg. | |
PCL_EXPORTS void | change_text_color (FILE *stream, int attribute, int fg) |
Change the text color (on either stdout or stderr) with an attr:fg. | |
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". | |
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". An example for a widely used switch argument is the "-r" flag for unix commands that indicates whether the command should run recursively or not. | |
PCL_EXPORTS VERBOSITY_LEVEL | getVerbosityLevel () |
PCL_EXPORTS bool | initVerbosityLevel () |
PCL_EXPORTS bool | isVerbosityLevelEnabled (VERBOSITY_LEVEL severity) |
template<typename Type > | |
int | parse (int argc, char **argv, const char *argument_name, Type &value) |
Template version for parsing arguments. Template parameter needs to have input stream operator overloaded! | |
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). Returns the values sent as doubles. | |
PCL_EXPORTS int | parse_2x_arguments (int argc, char **argv, const char *str, double &f, double &s, bool debug=true) |
Parse for specific given command line arguments (2x values comma separated). Returns the values sent as doubles. | |
PCL_EXPORTS int | parse_2x_arguments (int argc, char **argv, const char *str, int &f, int &s, bool debug=true) |
Parse for specific given command line arguments (2x values comma separated). Returns the values sent as ints. | |
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). Returns the values sent as doubles. | |
PCL_EXPORTS int | parse_3x_arguments (int argc, char **argv, const char *str, double &f, double &s, double &t, bool debug=true) |
Parse for specific given command line arguments (3x values comma separated). Returns the values sent as doubles. | |
PCL_EXPORTS int | parse_3x_arguments (int argc, char **argv, const char *str, int &f, int &s, int &t, bool debug=true) |
Parse for specific given command line arguments (3x values comma separated). Returns the values sent as ints. | |
PCL_EXPORTS int | parse_argument (int argc, char **argv, const char *str, std::string &val) |
Parse for a specific given command line argument. Returns the value sent as a string. | |
PCL_EXPORTS int | parse_argument (int argc, char **argv, const char *str, bool &val) |
Parse for a specific given command line argument. Returns the value sent as a boolean. | |
PCL_EXPORTS int | parse_argument (int argc, char **argv, const char *str, float &val) |
Parse for a specific given command line argument. Returns the value sent as a double. | |
PCL_EXPORTS int | parse_argument (int argc, char **argv, const char *str, double &val) |
Parse for a specific given command line argument. Returns the value sent as a double. | |
PCL_EXPORTS int | parse_argument (int argc, char **argv, const char *str, int &val) |
Parse for a specific given command line argument. Returns the value sent as an int. | |
PCL_EXPORTS int | parse_argument (int argc, char **argv, const char *str, unsigned int &val) |
Parse for a specific given command line argument. Returns the value sent as an unsigned int. | |
PCL_EXPORTS int | parse_argument (int argc, char **argv, const char *str, char &val) |
Parse for a specific given command line argument. Returns the value sent as an int. | |
PCL_EXPORTS std::vector< int > | parse_file_extension_argument (int argc, char **argv, const std::string &ext) |
Parse command line arguments for file names. Returns a vector with file names indices. | |
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 for specific given command line arguments (multiple occurances of 2x argument groups, separated by commas). Returns 2 vectors holding the given values. | |
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 for specific given command line arguments (multiple occurances of 3x argument groups, separated by commas). Returns 3 vectors holding the given values. | |
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 occurances of the same command line parameter). Returns the values sent as a vector. | |
PCL_EXPORTS bool | parse_multiple_arguments (int argc, char **argv, const char *str, std::vector< float > &values) |
Parse for specific given command line arguments (multiple occurances of the same command line parameter). Returns the values sent as a vector. | |
PCL_EXPORTS bool | parse_multiple_arguments (int argc, char **argv, const char *str, std::vector< double > &values) |
Parse for specific given command line arguments (multiple occurances of the same command line parameter). Returns the values sent as a vector. | |
PCL_EXPORTS bool | parse_multiple_arguments (int argc, char **argv, const char *str, std::vector< std::string > &values) |
Parse for a specific given command line argument (multiple occurences of the same command line parameter). Returns the value sent as a vector. | |
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). Returns the values sent as doubles. | |
PCL_EXPORTS int | parse_x_arguments (int argc, char **argv, const char *str, std::vector< float > &v) |
Parse for specific given command line arguments (N values comma separated). Returns the values sent as ints. | |
PCL_EXPORTS int | parse_x_arguments (int argc, char **argv, const char *str, std::vector< int > &v) |
Parse for specific given command line arguments (N values comma separated). Returns the values sent as ints. | |
PCL_EXPORTS void | print (VERBOSITY_LEVEL level, FILE *stream, const char *format,...) |
Print a message on stream. | |
PCL_EXPORTS void | print (VERBOSITY_LEVEL level, const char *format,...) |
Print a message. | |
PCL_EXPORTS void | print_color (FILE *stream, int attr, int fg, const char *format,...) |
Print a message on stream with colors. | |
PCL_EXPORTS void | print_debug (const char *format,...) |
Print a debug message on stream with colors. | |
PCL_EXPORTS void | print_debug (FILE *stream, const char *format,...) |
Print a debug message on stream with colors. | |
PCL_EXPORTS void | print_error (const char *format,...) |
Print an error message on stream with colors. | |
PCL_EXPORTS void | print_error (FILE *stream, const char *format,...) |
Print an error message on stream with colors. | |
PCL_EXPORTS void | print_highlight (const char *format,...) |
Print a highlighted info message on stream with colors. | |
PCL_EXPORTS void | print_highlight (FILE *stream, const char *format,...) |
Print a highlighted info message on stream with colors. | |
PCL_EXPORTS void | print_info (const char *format,...) |
Print an info message on stream with colors. | |
PCL_EXPORTS void | print_info (FILE *stream, const char *format,...) |
Print an info message on stream with colors. | |
PCL_EXPORTS void | print_value (const char *format,...) |
Print a value message on stream with colors. | |
PCL_EXPORTS void | print_value (FILE *stream, const char *format,...) |
Print a value message on stream with colors. | |
PCL_EXPORTS void | print_warn (const char *format,...) |
Print a warning message on stream with colors. | |
PCL_EXPORTS void | print_warn (FILE *stream, const char *format,...) |
Print a warning message on stream with colors. | |
PCL_EXPORTS void | reset_text_color (FILE *stream) |
Reset the text color (on either stdout or stderr) to its original state. | |
PCL_EXPORTS void | setVerbosityLevel (VERBOSITY_LEVEL level) |
Variables | |
static bool | s_NeedVerbosityInit = true |
static VERBOSITY_LEVEL | s_VerbosityLevel = pcl::console::L_INFO |
void pcl::console::change_text_color | ( | FILE * | stream, |
int | attribute, | ||
int | fg, | ||
int | bg | ||
) |
void pcl::console::change_text_color | ( | FILE * | stream, |
int | attribute, | ||
int | fg | ||
) |
int pcl::console::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".
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | argument_name | the string value to search for |
bool pcl::console::find_switch | ( | int | argc, |
char ** | argv, | ||
const char * | argument_name | ||
) |
Finds whether the argument with name "argument_name" is in the argument list "argv". An example for a widely used switch argument is the "-r" flag for unix commands that indicates whether the command should run recursively or not.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | argument_name | the string value to search for |
bool pcl::console::initVerbosityLevel | ( | ) |
bool pcl::console::isVerbosityLevelEnabled | ( | VERBOSITY_LEVEL | severity | ) |
int pcl::console::parse | ( | int | argc, |
char ** | argv, | ||
const char * | argument_name, | ||
Type & | value | ||
) |
Template version for parsing arguments. Template parameter needs to have input stream operator overloaded!
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | argument_name | the name of the argument to search for |
[out] | value | The value of the argument |
int pcl::console::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). Returns the values sent as doubles.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the command line argument to search for |
[out] | f | the first output value |
[out] | s | the second output value |
[in] | debug | whether to print debug info or not |
int pcl::console::parse_2x_arguments | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
double & | f, | ||
double & | s, | ||
bool | debug = true |
||
) |
Parse for specific given command line arguments (2x values comma separated). Returns the values sent as doubles.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the command line argument to search for |
[out] | f | the first output value |
[out] | s | the second output value |
[in] | debug | whether to print debug info or not |
int pcl::console::parse_2x_arguments | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
int & | f, | ||
int & | s, | ||
bool | debug = true |
||
) |
Parse for specific given command line arguments (2x values comma separated). Returns the values sent as ints.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the command line argument to search for |
[out] | f | the first output value |
[out] | s | the second output value |
[in] | debug | whether to print debug info or not |
int pcl::console::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). Returns the values sent as doubles.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the command line argument to search for |
[out] | f | the first output value |
[out] | s | the second output value |
[out] | t | the third output value |
[in] | debug | whether to print debug info or not |
int pcl::console::parse_3x_arguments | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
double & | f, | ||
double & | s, | ||
double & | t, | ||
bool | debug = true |
||
) |
Parse for specific given command line arguments (3x values comma separated). Returns the values sent as doubles.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the command line argument to search for |
[out] | f | the first output value |
[out] | s | the second output value |
[out] | t | the third output value |
[in] | debug | whether to print debug info or not |
int pcl::console::parse_3x_arguments | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
int & | f, | ||
int & | s, | ||
int & | t, | ||
bool | debug = true |
||
) |
Parse for specific given command line arguments (3x values comma separated). Returns the values sent as ints.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the command line argument to search for |
[out] | f | the first output value |
[out] | s | the second output value |
[out] | t | the third output value |
[in] | debug | whether to print debug info or not |
int pcl::console::parse_argument | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
std::string & | val | ||
) |
int pcl::console::parse_argument | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
bool & | val | ||
) |
int pcl::console::parse_argument | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
float & | val | ||
) |
int pcl::console::parse_argument | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
double & | val | ||
) |
int pcl::console::parse_argument | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
int & | val | ||
) |
int pcl::console::parse_argument | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
unsigned int & | val | ||
) |
int pcl::console::parse_argument | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
char & | val | ||
) |
std::vector< int > pcl::console::parse_file_extension_argument | ( | int | argc, |
char ** | argv, | ||
const std::string & | ext | ||
) |
bool pcl::console::parse_multiple_2x_arguments | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
std::vector< double > & | values_f, | ||
std::vector< double > & | values_s | ||
) |
Parse for specific given command line arguments (multiple occurances of 2x argument groups, separated by commas). Returns 2 vectors holding the given values.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the command line argument to search for |
[out] | values_f | the first vector of output values |
[out] | values_s | the second vector of output values |
bool pcl::console::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 for specific given command line arguments (multiple occurances of 3x argument groups, separated by commas). Returns 3 vectors holding the given values.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the command line argument to search for |
[out] | values_f | the first vector of output values |
[out] | values_s | the second vector of output values |
[out] | values_t | the third vector of output values |
bool pcl::console::parse_multiple_arguments | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
std::vector< int > & | values | ||
) |
Parse for specific given command line arguments (multiple occurances of the same command line parameter). Returns the values sent as a vector.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the command line argument to search for |
[out] | values | the resultant output values |
bool pcl::console::parse_multiple_arguments | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
std::vector< float > & | values | ||
) |
Parse for specific given command line arguments (multiple occurances of the same command line parameter). Returns the values sent as a vector.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the command line argument to search for |
[out] | values | the resultant output values |
bool pcl::console::parse_multiple_arguments | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
std::vector< double > & | values | ||
) |
Parse for specific given command line arguments (multiple occurances of the same command line parameter). Returns the values sent as a vector.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the command line argument to search for |
[out] | values | the resultant output values |
bool pcl::console::parse_multiple_arguments | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
std::vector< std::string > & | values | ||
) |
Parse for a specific given command line argument (multiple occurences of the same command line parameter). Returns the value sent as a vector.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the string value to search for |
[out] | values | the resultant output values |
int pcl::console::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). Returns the values sent as doubles.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the command line argument to search for |
[out] | v | the vector into which the parsed values will be copied |
int pcl::console::parse_x_arguments | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
std::vector< float > & | v | ||
) |
Parse for specific given command line arguments (N values comma separated). Returns the values sent as ints.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the command line argument to search for |
[out] | v | the vector into which the parsed values will be copied |
int pcl::console::parse_x_arguments | ( | int | argc, |
char ** | argv, | ||
const char * | str, | ||
std::vector< int > & | v | ||
) |
Parse for specific given command line arguments (N values comma separated). Returns the values sent as ints.
[in] | argc | the number of command line arguments |
[in] | argv | the command line arguments |
[in] | str | the command line argument to search for |
[out] | v | the vector into which the parsed values will be copied |
void pcl::console::print | ( | VERBOSITY_LEVEL | level, |
FILE * | stream, | ||
const char * | format, | ||
... | |||
) |
void pcl::console::print | ( | VERBOSITY_LEVEL | level, |
const char * | format, | ||
... | |||
) |
void pcl::console::print_color | ( | FILE * | stream, |
int | attr, | ||
int | fg, | ||
const char * | format, | ||
... | |||
) |
void pcl::console::print_debug | ( | const char * | format, |
... | |||
) |
void pcl::console::print_debug | ( | FILE * | stream, |
const char * | format, | ||
... | |||
) |
void pcl::console::print_error | ( | const char * | format, |
... | |||
) |
void pcl::console::print_error | ( | FILE * | stream, |
const char * | format, | ||
... | |||
) |
void pcl::console::print_highlight | ( | const char * | format, |
... | |||
) |
void pcl::console::print_highlight | ( | FILE * | stream, |
const char * | format, | ||
... | |||
) |
void pcl::console::print_info | ( | const char * | format, |
... | |||
) |
void pcl::console::print_info | ( | FILE * | stream, |
const char * | format, | ||
... | |||
) |
void pcl::console::print_value | ( | const char * | format, |
... | |||
) |
void pcl::console::print_value | ( | FILE * | stream, |
const char * | format, | ||
... | |||
) |
void pcl::console::print_warn | ( | const char * | format, |
... | |||
) |
void pcl::console::print_warn | ( | FILE * | stream, |
const char * | format, | ||
... | |||
) |
void pcl::console::reset_text_color | ( | FILE * | stream | ) |
void pcl::console::setVerbosityLevel | ( | VERBOSITY_LEVEL | level | ) |
bool pcl::console::s_NeedVerbosityInit = true [static] |