Split string generation code into separate files

This commit is contained in:
FeralChild64 authored and FeralChild64 committed 2025-02-06 18:38:28 +01:00
1 parent 98bb75bd60
commit 0362ada640
11 files changed
+2087 -1981

No files matched your search

+12 -23
View File
@@ -3,6 +3,10 @@
// for providing uniform user experience
//
#ifndef COMMON_H
#define COMMON_H
#include <iostream>
#include <string>
#include <cstdint>
@@ -15,35 +19,17 @@
#endif
const std::string BANNER_LINE = "//-------------------------------------------------------------------------------------------";
void ERROR();
void ERROR(const std::string &message);
void ERROR()
{
exit(-1);
}
void ERROR(const std::string &message)
{
std::cout << "\n" << "ERROR: " << message << "\n\n";
exit(-1);
}
void printBannerLineTop()
{
std::cout << "\n\n\n" << BANNER_LINE << "\n";
}
void printBannerLineBottom()
{
std::cout << BANNER_LINE << "\n\n";
}
void printBannerLineTop();
void printBannerLineBottom();
class DualStream
{
public:
DualStream(std::ostream& str1, std::ostream& str2) : str1(str1), str2(str2) {}
DualStream(std::ostream& str1, std::ostream& str2);
template<class T> DualStream &operator<<(const T& x)
{
@@ -57,3 +43,6 @@ private:
std::ostream& str1;
std::ostream& str2;
};
#endif // COMMON_H