btllib
 All Classes Namespaces Functions Variables
status.hpp
1 
4 #ifndef BTLLIB_STATUS_HPP
5 #define BTLLIB_STATUS_HPP
6 
7 #include <cstdlib>
8 #include <cstring>
9 #include <ctime>
10 #include <iostream>
11 #include <string>
12 
13 namespace btllib {
14 
15 constexpr const char* PRINT_COLOR_INFO = "\33[32m";
16 constexpr const char* PRINT_COLOR_WARNING = "\33[33m";
17 constexpr const char* PRINT_COLOR_ERROR = "\33[31m";
18 constexpr const char* PRINT_COLOR_END = "\33[0m";
19 
23 std::string
24 get_time();
25 
31 void
32 log_info(const std::string& msg);
33 
39 void
40 log_warning(const std::string& msg);
41 
47 void
48 log_error(const std::string& msg);
49 
56 void
57 check_info(bool condition, const std::string& msg);
58 
65 void
66 check_warning(bool condition, const std::string& msg);
67 
76 void
77 check_error(bool condition, const std::string& msg);
78 
79 std::string
80 get_strerror();
81 
89 void
90 check_stream(const std::ios& stream, const std::string& name);
91 
98 void
99 check_file_accessibility(const std::string& filepath);
100 
101 } // namespace btllib
102 
103 #endif
void check_stream(const std::ios &stream, const std::string &name)
void check_warning(bool condition, const std::string &msg)
void check_file_accessibility(const std::string &filepath)
void check_error(bool condition, const std::string &msg)
void check_info(bool condition, const std::string &msg)
void log_error(const std::string &msg)
std::string get_time()
void log_info(const std::string &msg)
void log_warning(const std::string &msg)