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 } |
Functions | |
void | change_text_color (FILE *stream, int attribute, int fg) |
Change the text color (on either stdout or stderr) with an attr:fg. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
void | print_color (FILE *stream, int attr, int fg, const char *format,...) |
Print a message on stream with colors. | |
void | print_debug (FILE *stream, const char *format,...) |
Print a debug message on stream with colors. | |
void | print_debug (const char *format,...) |
Print a debug message on stream with colors. | |
void | print_error (FILE *stream, const char *format,...) |
Print an error message on stream with colors. | |
void | print_error (const char *format,...) |
Print an error message on stream with colors. | |
void | print_highlight (FILE *stream, const char *format,...) |
Print a highlighted info message on stream with colors. | |
void | print_highlight (const char *format,...) |
Print a highlighted info message on stream with colors. | |
void | print_info (FILE *stream, const char *format,...) |
Print an info message on stream with colors. | |
void | print_info (const char *format,...) |
Print an info message on stream with colors. | |
void | print_value (FILE *stream, const char *format,...) |
Print a value message on stream with colors. | |
void | print_value (const char *format,...) |
Print a value message on stream with colors. | |
void | print_warn (FILE *stream, const char *format,...) |
Print a warning message on stream with colors. | |
void | print_warn (const char *format,...) |
Print a warning message on stream with colors. | |
void | reset_text_color (FILE *stream) |
Reset the text color (on either stdout or stderr) to its original state. |
void terminal_tools::change_text_color | ( | FILE * | stream, | |
int | attribute, | |||
int | fg | |||
) |
void terminal_tools::change_text_color | ( | FILE * | stream, | |
int | attribute, | |||
int | fg, | |||
int | bg | |||
) |
int terminal_tools::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.
argc | the number of command line arguments | |
argv | the command line arguments | |
str | the command line argument to search for | |
f | the first output value | |
s | the second output value |
int terminal_tools::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.
argc | the number of command line arguments | |
argv | the command line arguments | |
str | the command line argument to search for | |
f | the first output value | |
s | the second output value |
int terminal_tools::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.
argc | the number of command line arguments | |
argv | the command line arguments | |
str | the command line argument to search for | |
f | the first output value | |
s | the second output value | |
t | the third output value |
int terminal_tools::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.
argc | the number of command line arguments | |
argv | the command line arguments | |
str | the command line argument to search for | |
f | the first output value | |
s | the second output value | |
t | the third output value |
int terminal_tools::parse_argument | ( | int | argc, | |
char ** | argv, | |||
const char * | str, | |||
unsigned int & | val | |||
) |
int terminal_tools::parse_argument | ( | int | argc, | |
char ** | argv, | |||
const char * | str, | |||
int & | val | |||
) |
int terminal_tools::parse_argument | ( | int | argc, | |
char ** | argv, | |||
const char * | str, | |||
double & | val | |||
) |
int terminal_tools::parse_argument | ( | int | argc, | |
char ** | argv, | |||
const char * | str, | |||
bool & | val | |||
) |
int terminal_tools::parse_argument | ( | int | argc, | |
char ** | argv, | |||
const char * | str, | |||
std::string & | val | |||
) |
std::vector< int > terminal_tools::parse_file_extension_argument | ( | int | argc, | |
char ** | argv, | |||
const std::string & | extension | |||
) |
bool terminal_tools::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.
argc | the number of command line arguments | |
argv | the command line arguments | |
str | the command line argument to search for | |
values_f | the first vector of output values | |
values_s | the second vector of output values |
bool terminal_tools::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.
argc | the number of command line arguments | |
argv | the command line arguments | |
str | the command line argument to search for | |
values_f | the first vector of output values | |
values_s | the second vector of output values | |
values_t | the third vector of output values |
bool terminal_tools::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.
argc | the number of command line arguments | |
argv | the command line arguments | |
str | the command line argument to search for | |
values | the resultant output values |
bool terminal_tools::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.
argc | the number of command line arguments | |
argv | the command line arguments | |
str | the command line argument to search for | |
values | the resultant output values |
void terminal_tools::print_color | ( | FILE * | stream, | |
int | attr, | |||
int | fg, | |||
const char * | format, | |||
... | ||||
) |
void terminal_tools::print_debug | ( | FILE * | stream, | |
const char * | format, | |||
... | ||||
) |
void terminal_tools::print_debug | ( | const char * | format, | |
... | ||||
) |
void terminal_tools::print_error | ( | FILE * | stream, | |
const char * | format, | |||
... | ||||
) |
void terminal_tools::print_error | ( | const char * | format, | |
... | ||||
) |
void terminal_tools::print_highlight | ( | FILE * | stream, | |
const char * | format, | |||
... | ||||
) |
void terminal_tools::print_highlight | ( | const char * | format, | |
... | ||||
) |
void terminal_tools::print_info | ( | FILE * | stream, | |
const char * | format, | |||
... | ||||
) |
void terminal_tools::print_info | ( | const char * | format, | |
... | ||||
) |
void terminal_tools::print_value | ( | FILE * | stream, | |
const char * | format, | |||
... | ||||
) |
void terminal_tools::print_value | ( | const char * | format, | |
... | ||||
) |
void terminal_tools::print_warn | ( | FILE * | stream, | |
const char * | format, | |||
... | ||||
) |
void terminal_tools::print_warn | ( | const char * | format, | |
... | ||||
) |