#include <console.h>
|  | 
| int | parseArguments (int argc, const char **argv, const char *str, double &val) | 
|  | 
|  | 
| static int | findArguments (int argc, const char **argv, const char *argument_name) | 
|  | 
| static int | parseArguments (int argc, const char **argv, const char *str, std::string &val) | 
|  | 
| static int | parseArguments (int argc, const char **argv, const char *str, bool &val) | 
|  | 
| static int | parseArguments (int argc, const char **argv, const char *str, int &val) | 
|  | 
| static int | parseArguments (int argc, const char **argv, const char *str, float &val) | 
|  | 
| static int | parseArguments (int argc, const char **argv, const char *str, unsigned int &val) | 
|  | 
| static int | parseArguments (int argc, const char **argv, const char *str, char &val) | 
|  | 
| static int | parseArguments (int argc, const char **argv, const char *str, std::vector< std::string > &vals) | 
|  | 
| static int | parseArguments (int argc, const char **argv, const char *str, std::vector< int > &vals) | 
|  | 
| static void | info (const std::string &val) | 
|  | 
| static void | warning (const std::string &val) | 
|  | 
| static void | error (const std::string &val) | 
|  | 
| static std::string | str_info (const std::string &val) | 
|  | 
| static std::string | str_warning (const std::string &val) | 
|  | 
| static std::string | str_error (const std::string &val) | 
|  | 
- Todo:
- a member method like string but with const char* is missing. 
Definition at line 30 of file console.h.
  
  | 
        
          | static void console::error | ( | const std::string & | val | ) |  |  | static | 
 
Predefined error message output in the console.
- Parameters
- 
  
    | val | The string to be shown. |  
 
 
 
  
  | 
        
          | static int console::findArguments | ( | int | argc, |  
          |  |  | const char ** | argv, |  
          |  |  | const char * | argument_name |  
          |  | ) |  |  |  | static | 
 
Looks for the position index within the command which called the program of the parameter char[] '-whatever' and returns it, or -1 if not found. Its inputs are the same as for the main function.
NOTE: This is an internal function, not recommended to be used as a stand-alone function, it is used in the parseArguments functions of this class. However, it is left public because it could be useful for anybody.
- Parameters
- 
  
    | argc | number of parameters given in the command line. |  | argv | array of char[] with the parameters given in the command line. |  
 
- Returns
- The index of the char searched. -1 if not found. 
 
 
  
  | 
        
          | static void console::info | ( | const std::string & | val | ) |  |  | static | 
 
Predefined information message output in the console.
- Parameters
- 
  
    | val | The string to be shown. |  
 
 
 
  
  | 
        
          | static int console::parseArguments | ( | int | argc, |  
          |  |  | const char ** | argv, |  
          |  |  | const char * | str, |  
          |  |  | std::string & | val |  
          |  | ) |  |  |  | static | 
 
Looks for the argument given in str and stores its value in val, assuming simple input.
Example: 
 and the program is run with the command: $ ./test -t 1 The result will be idx = 2 (third position) and val = 1.
- Parameters
- 
  
    | argc | number of parameters given in the command line. |  | argv | array of char[] with the parameters given in the command line. |  | str | argument to look for. |  | val | output variable which stores the value of the argument. |  
 
- Returns
- The index position in which the argument value was found. 
 
 
  
  | 
        
          | static int console::parseArguments | ( | int | argc, |  
          |  |  | const char ** | argv, |  
          |  |  | const char * | str, |  
          |  |  | bool & | val |  
          |  | ) |  |  |  | static | 
 
 
  
  | 
        
          | static int console::parseArguments | ( | int | argc, |  
          |  |  | const char ** | argv, |  
          |  |  | const char * | str, |  
          |  |  | int & | val |  
          |  | ) |  |  |  | static | 
 
 
  
  | 
        
          | static int console::parseArguments | ( | int | argc, |  
          |  |  | const char ** | argv, |  
          |  |  | const char * | str, |  
          |  |  | float & | val |  
          |  | ) |  |  |  | static | 
 
 
      
        
          | int console::parseArguments | ( | int | argc, | 
        
          |  |  | const char ** | argv, | 
        
          |  |  | const char * | str, | 
        
          |  |  | double & | val | 
        
          |  | ) |  |  | 
      
 
 
  
  | 
        
          | static int console::parseArguments | ( | int | argc, |  
          |  |  | const char ** | argv, |  
          |  |  | const char * | str, |  
          |  |  | unsigned int & | val |  
          |  | ) |  |  |  | static | 
 
Same as the others parseArguments. unsigned int as output. 
- See Also
- parseArguments() 
 
 
  
  | 
        
          | static int console::parseArguments | ( | int | argc, |  
          |  |  | const char ** | argv, |  
          |  |  | const char * | str, |  
          |  |  | char & | val |  
          |  | ) |  |  |  | static | 
 
 
  
  | 
        
          | static int console::parseArguments | ( | int | argc, |  
          |  |  | const char ** | argv, |  
          |  |  | const char * | str, |  
          |  |  | std::vector< std::string > & | vals |  
          |  | ) |  |  |  | static | 
 
Looks for the argument given in str and stores its value in val, assuming multiple input.
Example: 
std::vector<std::string> vals;
 and the program is run with the command: $ ./test -input param1 param2 param3 The result will be idx = 2 (third position) and vals = "param1" "param2" "param3".
- Parameters
- 
  
    | argc | number of parameters given in the command line. |  | argv | array of char[] with the parameters given in the command line. |  | str | argument to look for. |  | val | output variable which stores the values of the argument, using a std::vector.<> |  
 
- Returns
- The index position in which the argument value was found. 
 
 
  
  | 
        
          | static int console::parseArguments | ( | int | argc, |  
          |  |  | const char ** | argv, |  
          |  |  | const char * | str, |  
          |  |  | std::vector< int > & | vals |  
          |  | ) |  |  |  | static | 
 
Same as the others parseArguments. ints as output. 
- See Also
- int parseArguments (int argc, char** argv, const char* str, std::vector<std::string> & vals); 
 
 
  
  | 
        
          | static std::string console::str_error | ( | const std::string & | val | ) |  |  | static | 
 
Predefined error message returned in a std::string. Useful when overloading the ostream operator (<<) or to integrate it withtin other messages.
- Parameters
- 
  
    | val | The string to be shown. |  
 
 
 
  
  | 
        
          | static std::string console::str_info | ( | const std::string & | val | ) |  |  | static | 
 
Predefined information message returned in a std::string. Useful when overloading the ostream operator (<<) or to integrate it withtin other messages.
- Parameters
- 
  
    | val | The string to be shown. |  
 
 
 
  
  | 
        
          | static std::string console::str_warning | ( | const std::string & | val | ) |  |  | static | 
 
Predefined warning message returned in a std::string. Useful when overloading the ostream operator (<<) or to integrate it withtin other messages.
- Parameters
- 
  
    | val | The string to be shown. |  
 
 
 
  
  | 
        
          | static void console::warning | ( | const std::string & | val | ) |  |  | static | 
 
Predefined warning message output in the console.
- Parameters
- 
  
    | val | The string to be shown. |  
 
 
 
The documentation for this class was generated from the following file:
- /home/jvgomez/Desktop/fastmarching/include/fast_methods/console/console.h