dropshell release 2025.0518.1300
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled

This commit is contained in:
Your Name
2025-05-18 13:00:35 +12:00
parent 668cef5a05
commit 828171c977
6 changed files with 246 additions and 84 deletions

View File

@ -4,6 +4,7 @@
#include <iostream>
#include <string>
#include <vector>
#include <ostream>
/*
@ -47,5 +48,37 @@ enum class sColour {
*/
// Output streams for different log levels
extern std::ostream& debug;
extern std::ostream& info;
extern std::ostream& warning;
extern std::ostream& error;
// Enum for colours
enum class sColour {
RESET,
DEBUG,
INFO,
WARNING,
ERROR
};
// Set colour for a stream
void SetColour(sColour colour, std::ostream& os = std::cerr);
// Helper print functions
void PrintDebug(const std::string& msg);
void PrintInfo(const std::string& msg);
void PrintWarning(const std::string& msg);
void PrintError(const std::string& msg);
class SwitchColour
{
public:
SwitchColour(sColour colour, std::ostream& os = std::cerr);
~SwitchColour();
private:
std::ostream& os_;
sColour colour_;
};
#endif // OUTPUT_HPP