Copperfield Engine 0.1
C++ Game Engine
Loading...
Searching...
No Matches
log.hpp
Go to the documentation of this file.
1#pragma once
2#include <iostream>
3#include <map>
4#include <string>
5#include <utility>
6#include <vector>
7
10
12enum class LogColor {
13 White,
14 Red,
15 Green,
16 Yellow,
17 Blue,
18 Pink,
19 Orange
20};
21
23class Log {
24public:
25 friend class Editor;
26
28 Log() = default;
29 ~Log();
30
32 Log(const Log& other) = delete;
34 Log(Log&& other) = delete;
36 Log& operator=(Log& other) = delete;
38 Log& operator=(Log&& other) = delete;
39
45 static void newLog(std::string text, LogColor textcolor = LogColor::White);
46
47private:
48 inline static std::vector<std::pair<LogColor, std::string>> logs_;
49};
Display and allows to modify entity information in real time.
Definition: editor.hpp:14
Class used for globally printing messages and storing them to a file.
Definition: log.hpp:23
Log(Log &&other)=delete
Move constructor (deleted).
Log()=default
Default constructor.
static void newLog(std::string text, LogColor textcolor=LogColor::White)
Add a new log entry.
Log(const Log &other)=delete
Copy constructor (deleted).
Log & operator=(Log &other)=delete
Copy assignment operator (deleted).
Log & operator=(Log &&other)=delete
Move assignment operator (deleted).
LogColor
Colors allowed to be used for log messages.
Definition: log.hpp:12
@ White
White color.
@ Yellow
Yellow color.
@ Pink
Pink color.
@ Orange
Orange color.
@ Blue
Blue color.
@ Green
Green color.
@ Red
Red color.