Point Cloud Library (PCL)  1.3.1
Classes | Enumerations | Functions
pcl::console Namespace Reference

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 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"
template<typename Type >
int parse (int argc, char **argv, const char *argument_name, Type &value)
 template version for parsing arguments.
PCL_EXPORTS int parse_argument (int argc, char **argv, const char *str, std::string &val)
 Parse for a specific given command line argument.
PCL_EXPORTS int parse_argument (int argc, char **argv, const char *str, bool &val)
 Parse for a specific given command line argument.
PCL_EXPORTS int parse_argument (int argc, char **argv, const char *str, double &val)
 Parse for a specific given command line argument.
PCL_EXPORTS int parse_argument (int argc, char **argv, const char *str, int &val)
 Parse for a specific given command line argument.
PCL_EXPORTS int parse_argument (int argc, char **argv, const char *str, unsigned int &val)
 Parse for a specific given command line argument.
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).
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).
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).
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).
PCL_EXPORTS int parse_x_arguments (int argc, char **argv, const char *str, std::vector< double > &v, bool debug=true)
 Parse for specific given command line arguments (3x values comma separated).
PCL_EXPORTS int parse_x_arguments (int argc, char **argv, const char *str, std::vector< int > &v, bool debug=true)
 Parse for specific given command line arguments (N values comma separated).
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).
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).
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).
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).
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).
PCL_EXPORTS std::vector< int > parse_file_extension_argument (int argc, char **argv, const std::string &ext)
 Parse command line arguments for file names.
PCL_EXPORTS void setVerbosityLevel (VERBOSITY_LEVEL level)
 set the verbosity level
PCL_EXPORTS VERBOSITY_LEVEL getVerbosityLevel ()
 get the verbosity level.
PCL_EXPORTS bool initVerbosityLevel ()
 initialize verbosity level.
PCL_EXPORTS bool isVerbosityLevelEnabled (VERBOSITY_LEVEL severity)
 is verbosity level enabled?
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 void reset_text_color (FILE *stream)
 Reset the text color (on either stdout or stderr) to its original state.
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_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_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_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_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 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_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 (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.

Enumeration Type Documentation

Enumerator:
TT_RESET 
TT_BRIGHT 
TT_DIM 
TT_UNDERLINE 
TT_BLINK 
TT_REVERSE 
TT_HIDDEN 

Definition at line 56 of file print.h.

Enumerator:
TT_BLACK 
TT_RED 
TT_GREEN 
TT_YELLOW 
TT_BLUE 
TT_MAGENTA 
TT_CYAN 
TT_WHITE 

Definition at line 67 of file print.h.

Enumerator:
L_ALWAYS 
L_ERROR 
L_WARN 
L_INFO 
L_DEBUG 
L_VERBOSE 

Definition at line 79 of file print.h.


Function Documentation

PCL_EXPORTS void pcl::console::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.

Parameters:
streamthe output stream (stdout, stderr, etc)
attributethe text attribute
fgthe foreground color
bgthe background color
PCL_EXPORTS void pcl::console::change_text_color ( FILE *  stream,
int  attribute,
int  fg 
)

Change the text color (on either stdout or stderr) with an attr:fg.

Parameters:
streamthe output stream (stdout, stderr, etc)
attributethe text attribute
fgthe foreground color
PCL_EXPORTS 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"

Parameters:
argcthe number of command line arguments
argvthe command line arguments
argument_namethe string value to search for
Returns:
index of found argument or -1 of arguments does not appear in list
PCL_EXPORTS VERBOSITY_LEVEL pcl::console::getVerbosityLevel ( )

get the verbosity level.

PCL_EXPORTS bool pcl::console::initVerbosityLevel ( )

initialize verbosity level.

PCL_EXPORTS bool pcl::console::isVerbosityLevelEnabled ( VERBOSITY_LEVEL  severity)

is verbosity level enabled?

template<typename Type >
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!

Parameters:
argcthe number of command line arguments
argvthe command line arguments
argument_namethe name of the argument to search for
valueThe value of the argument
Returns:
index of found argument or -1 of arguments does not appear in list

Definition at line 71 of file parse.h.

PCL_EXPORTS 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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe command line argument to search for
fthe first output value
sthe second output value
debugwhether to print debug info or not
PCL_EXPORTS 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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe command line argument to search for
fthe first output value
sthe second output value
debugwhether to print debug info or not
PCL_EXPORTS 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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe command line argument to search for
fthe first output value
sthe second output value
tthe third output value
debugwhether to print debug info or not
PCL_EXPORTS 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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe command line argument to search for
fthe first output value
sthe second output value
tthe third output value
debugwhether to print debug info or not
PCL_EXPORTS int pcl::console::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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe string value to search for
valthe resultant value
PCL_EXPORTS int pcl::console::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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe string value to search for
valthe resultant value
PCL_EXPORTS int pcl::console::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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe string value to search for
valthe resultant value
PCL_EXPORTS int pcl::console::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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe string value to search for
valthe resultant value
PCL_EXPORTS int pcl::console::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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe string value to search for
valthe resultant value
PCL_EXPORTS std::vector<int> pcl::console::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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
extthe extension to search for
PCL_EXPORTS 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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe command line argument to search for
values_fthe first vector of output values
values_sthe second vector of output values
PCL_EXPORTS 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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe command line argument to search for
values_fthe first vector of output values
values_sthe second vector of output values
values_tthe third vector of output values
PCL_EXPORTS 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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe command line argument to search for
valuesthe resultant output values
PCL_EXPORTS 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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe command line argument to search for
valuesthe resultant output values
PCL_EXPORTS 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.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe string value to search for
valuesthe resultant output values
PCL_EXPORTS int pcl::console::parse_x_arguments ( int  argc,
char **  argv,
const char *  str,
std::vector< double > &  v,
bool  debug = true 
)

Parse for specific given command line arguments (3x values comma separated).

Returns the values sent as doubles.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe command line argument to search for
vthe vector into which the parsed values will be copied
debugwhether to print debug info or not
PCL_EXPORTS int pcl::console::parse_x_arguments ( int  argc,
char **  argv,
const char *  str,
std::vector< int > &  v,
bool  debug = true 
)

Parse for specific given command line arguments (N values comma separated).

Returns the values sent as ints.

Parameters:
argcthe number of command line arguments
argvthe command line arguments
strthe command line argument to search for
vthe vector into which the parsed values will be copied
debugwhether to print debug info or not
PCL_EXPORTS void pcl::console::print ( VERBOSITY_LEVEL  level,
FILE *  stream,
const char *  format,
  ... 
)

Print a message on stream.

Parameters:
levelthe verbosity level
streamthe output stream (stdout, stderr, etc)
formatthe message
PCL_EXPORTS void pcl::console::print ( VERBOSITY_LEVEL  level,
const char *  format,
  ... 
)

Print a message.

Parameters:
levelthe verbosity level
formatthe message
PCL_EXPORTS void pcl::console::print_color ( FILE *  stream,
int  attr,
int  fg,
const char *  format,
  ... 
)

Print a message on stream with colors.

Parameters:
streamthe output stream (stdout, stderr, etc)
attrthe text attribute
fgthe foreground color
formatthe message
PCL_EXPORTS void pcl::console::print_debug ( const char *  format,
  ... 
)

Print a debug message on stream with colors.

Parameters:
formatthe message
PCL_EXPORTS void pcl::console::print_debug ( FILE *  stream,
const char *  format,
  ... 
)

Print a debug message on stream with colors.

Parameters:
streamthe output stream (stdout, stderr, etc)
formatthe message
PCL_EXPORTS void pcl::console::print_error ( const char *  format,
  ... 
)

Print an error message on stream with colors.

Parameters:
formatthe message
PCL_EXPORTS void pcl::console::print_error ( FILE *  stream,
const char *  format,
  ... 
)

Print an error message on stream with colors.

Parameters:
streamthe output stream (stdout, stderr, etc)
formatthe message
PCL_EXPORTS void pcl::console::print_highlight ( const char *  format,
  ... 
)

Print a highlighted info message on stream with colors.

Parameters:
formatthe message
PCL_EXPORTS void pcl::console::print_highlight ( FILE *  stream,
const char *  format,
  ... 
)

Print a highlighted info message on stream with colors.

Parameters:
streamthe output stream (stdout, stderr, etc)
formatthe message
PCL_EXPORTS void pcl::console::print_info ( const char *  format,
  ... 
)

Print an info message on stream with colors.

Parameters:
formatthe message
PCL_EXPORTS void pcl::console::print_info ( FILE *  stream,
const char *  format,
  ... 
)

Print an info message on stream with colors.

Parameters:
streamthe output stream (stdout, stderr, etc)
formatthe message
PCL_EXPORTS void pcl::console::print_value ( const char *  format,
  ... 
)

Print a value message on stream with colors.

Parameters:
formatthe message
PCL_EXPORTS void pcl::console::print_value ( FILE *  stream,
const char *  format,
  ... 
)

Print a value message on stream with colors.

Parameters:
streamthe output stream (stdout, stderr, etc)
formatthe message
PCL_EXPORTS void pcl::console::print_warn ( const char *  format,
  ... 
)

Print a warning message on stream with colors.

Parameters:
formatthe message
PCL_EXPORTS void pcl::console::print_warn ( FILE *  stream,
const char *  format,
  ... 
)

Print a warning message on stream with colors.

Parameters:
streamthe output stream (stdout, stderr, etc)
formatthe message
PCL_EXPORTS void pcl::console::reset_text_color ( FILE *  stream)

Reset the text color (on either stdout or stderr) to its original state.

Parameters:
streamthe output stream (stdout, stderr, etc)
PCL_EXPORTS void pcl::console::setVerbosityLevel ( VERBOSITY_LEVEL  level)

set the verbosity level

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines