Namespace that helps executing commands, dumping messages, writing log files.
More...
|
std::string | run (std::string format,...) |
| Excecute a command and get result. More...
|
|
int | system (std::string format,...) |
| Excecute a command and get result. More...
|
|
std::string | tstr (double msec) |
| Convert time duration to string. More...
|
|
std::string | nth (int num) |
| Convert enumeration to string such as 1st, 2nd. More...
|
|
std::string | size_str (size_t bytes) |
| Convert byte size to string such as killo bytes and mega bytes. More...
|
|
std::string | format_str (std::string format,...) |
| Format string with given arguments. More...
|
|
void | set_root_path (std::string path) |
| Set path to export log files. More...
|
|
std::string | get_root_path () |
| Get path to export log files. More...
|
|
void | dump (std::string format,...) |
| Print a log message in a single line. More...
|
|
void | set_time (double time) |
| Set a time for logging. More...
|
|
void | write (std::string name, double number) |
| Export number associated with the name as log file. More...
|
|
Namespace that helps executing commands, dumping messages, writing log files.
◆ dump()
void console::dump |
( |
std::string |
format, |
|
|
|
... |
|
) |
| |
Print a log message in a single line.
- Parameters
-
[in] | format | Message to print. |
◆ format_str()
std::string console::format_str |
( |
std::string |
format, |
|
|
|
... |
|
) |
| |
Format string with given arguments.
- Parameters
-
- Returns
- Formatted string.
◆ get_root_path()
std::string console::get_root_path |
( |
| ) |
|
Get path to export log files.
- Returns
- If set, path to export. Empty string otherwise.
◆ nth()
std::string console::nth |
( |
int |
num | ) |
|
Convert enumeration to string such as 1st, 2nd.
- Parameters
-
[in] | num | Enumeration in integer. |
- Returns
- Converted string.
◆ run()
std::string console::run |
( |
std::string |
format, |
|
|
|
... |
|
) |
| |
Excecute a command and get result.
- Parameters
-
[in] | foramt | Formatted command string. |
- Returns
- Result as string.
◆ set_root_path()
void console::set_root_path |
( |
std::string |
path | ) |
|
Set path to export log files.
- Parameters
-
◆ set_time()
void console::set_time |
( |
double |
time | ) |
|
Set a time for logging.
- Parameters
-
[in] | time | Time to set. Typically in milliseconds. |
◆ size_str()
std::string console::size_str |
( |
size_t |
bytes | ) |
|
Convert byte size to string such as killo bytes and mega bytes.
- Parameters
-
- Returns
- Converted string.
◆ system()
int console::system |
( |
std::string |
format, |
|
|
|
... |
|
) |
| |
Excecute a command and get result.
- Parameters
-
[in] | foramt | Formatted command string. |
- Returns
- Result as integer.
◆ tstr()
std::string console::tstr |
( |
double |
msec | ) |
|
Convert time duration to string.
- Parameters
-
[in] | msec | Time in milliseconds. |
- Returns
- Converted string.
◆ write()
void console::write |
( |
std::string |
name, |
|
|
double |
number |
|
) |
| |
Export number associated with the name as log file.
- Parameters
-
[in] | name | Name associated with the number. |
[in] | number | Number to record. |