CppTools
Loading...
Searching...
No Matches
IOTools.hpp
Go to the documentation of this file.
1
11#ifndef CPP_TOOLS_IOTOOLS_HPP
12#define CPP_TOOLS_IOTOOLS_HPP
13
14#include <stdio.h>
15#include <sys/ioctl.h>
16#include <unistd.h>
17
18#include <vector>
19
20#include "ErrorHandler.hpp"
21#include "StrTools.hpp"
22
24namespace CppTools
25{
29 template <typename... T>
30 void Print(T... args)
31 {
32 ((std::cout << args << " "), ...);
33 std::cout << std::endl;
34 }
35
38 int GetTerminalWidth();
42 void PrintInfo(const std::string& message);
56 void PrintSimpleSeparator(const std::string& leftEdge = "|", const std::string& body = "-",
57 const std::string& rightEdge = "|", int length = -1);
72 void PrintSeparator(const std::string& message, const std::string& color = "",
73 const std::string& leftEdge = "//", const std::string& body = "-",
74 const std::string& rightEdge = "//", int length = -1);
88 void Print2EntrySeparator(const std::string& entry1, const std::string& entry2,
89 const std::string& leftEdge = "|", const std::string& rightEdge = "|",
90 int length = -1);
108 void PrintMessageBox(const std::string& message, const std::string& ULCorner = "╓",
109 const std::string& URCorner = "╖", const std::string& horizontalLine = "─",
110 const std::string& verticalLine = "║", const std::string& BLCorner = "╙",
111 const std::string& BRCorner = "╜", int length = -1);
112}
113
114#endif /* CPP_TOOLS_IOTOOLS_HPP */
Contains useful set of functions to print errors, warning, check existence of files,...
void Print(T... args)
Variadic print functions.
Definition IOTools.hpp:30
Contains useful set of functions to work with std::string and to convert various types in std::string...