Loading [MathJax]/extensions/tex2jax.js
Parallel numerical verification of the σ_odd problem  October 6, 2018
All Classes Namespaces Files Functions Variables Typedefs Macros
Namespaces | Functions | Variables
helper.cpp File Reference
#include "helper.hpp"
#include "../sigmaodd/helper.hpp"
Include dependency graph for helper.cpp:

Go to the source code of this file.

Namespaces

 helper
 Some generic helper functions for programs.
 

Functions

std::string helper::concat_path (std::string path1, std::string path2)
 Return the path composed by path1/path2. More...
 
std::string helper::duration_ms_to_string (double duration_ms)
 Return a string with the duration expressed in milliseconds, seconds, minutes and hours, separated by tabulation. More...
 
std::string helper::duration_to_string (std::chrono::duration< double > duration_second)
 Return a string with the duration expressed in milliseconds, seconds, minutes and hours, separated by tabulation. More...
 
std::string helper::file_to_string (std::string filename)
 Read the file and return its content to a string. If failed then print a error message and exit. More...
 
std::string helper::get_string (int argc, const char *const argv[], unsigned int i, void(*help_and_exit_function)()=nullptr)
 Return argv[i] converted in string. More...
 
unsigned int helper::get_uint (int argc, const char *const argv[], unsigned int i, void(*help_and_exit_function)()=nullptr)
 Return argv[i] converted in integer. More...
 
unsigned long helper::get_ulong (int argc, const char *const argv[], unsigned int i, void(*help_and_exit_function)()=nullptr)
 Return argv[i] converted in integer. More...
 
bool helper::is_file_exists (std::string filename)
 Return true iff the file (or directory) exists. More...
 
void helper::print_intern_config_compiler ()
 Print to stdcout the intern configuration of the compiler. More...
 
std::string helper::remove_last_if_null (const std::string &s)
 If s terminates by a null character then return a copy of s without this last character, else return s. More...
 
std::string helper::to_string (bool b)
 Return the string "true" if b, else "false". More...
 

Variables

const char helper::sep_ = '/'
 

Detailed Description

(January 8, 2018)

GPLv3 — Copyright (C) 2017, 2018 Olivier Pirson http://www.opimedia.be/

Definition in file helper.cpp.