btllib: include/btllib/status.hpp Source File

btllib

Loading...
Searching...
No Matches
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
13namespace btllib {
14
15constexpr const char* PRINT_COLOR_INFO = "\33[32m";
16constexpr const char* PRINT_COLOR_WARNING = "\33[33m";
17constexpr const char* PRINT_COLOR_ERROR = "\33[31m";
18constexpr const char* PRINT_COLOR_END = "\33[0m";
19
23std::string
24get_time();
25
31void
32log_info(const std::string& msg);
33
39void
40log_warning(const std::string& msg);
41
47void
48log_error(const std::string& msg);
49
56void
57check_info(bool condition, const std::string& msg);
58
65void
66check_warning(bool condition, const std::string& msg);
67
76void
77check_error(bool condition, const std::string& msg);
78
79std::string
80get_strerror();
81
89void
90check_stream(const std::ios& stream, const std::string& name);
91
98void
99check_file_accessibility(const std::string& filepath);
100
101} // namespace btllib
102
103#endif
btllib
Definition aahash.hpp:12
btllib::log_warning
void log_warning(const std::string &msg)
btllib::check_error
void check_error(bool condition, const std::string &msg)
btllib::check_warning
void check_warning(bool condition, const std::string &msg)
btllib::get_time
std::string get_time()
btllib::check_stream
void check_stream(const std::ios &stream, const std::string &name)
btllib::log_info
void log_info(const std::string &msg)
btllib::check_file_accessibility
void check_file_accessibility(const std::string &filepath)
btllib::log_error
void log_error(const std::string &msg)
btllib::check_info
void check_info(bool condition, const std::string &msg)