Leviathan  0.8.0.0
Leviathan game engine
ErrorReporter.h
Go to the documentation of this file.
1 // (c) Henri Hyyryläinen 2015-2016
2 #pragma once
3 #include "Include.h"
4 #include <string>
5 
6 // Error reporting interface //
8 public:
9 
10  virtual void Write(const std::string &Text) = 0;
11  virtual void WriteLine(const std::string &Text) = 0;
12 
13  virtual void Info(const std::string &Text) = 0;
14  virtual void Warning(const std::string &Text) = 0;
15  virtual void Error(const std::string &Text) = 0;
16 
18  virtual void Fatal(const std::string &Text) = 0;
19 };
20 
21 #if UE_BUILD_DEBUG == 1 || UE_BUILD_DEVELOPMENT == 1 || UE_BUILD_TEST == 1 || UE_BUILD_SHIPPING == 1
22 #ifndef LEVIATHAN_UE_PLUGIN
23 #error One of UE build macros is defined but LEVIATHAN_UE_PLUGIN is not defined
24 #endif //LEVIATHAN_UE_PLUGIN
25 #include "Platform.h"
26 
27 
28 class FErrorReporter : public LErrorReporter {
29 public:
30 
31  virtual void WriteF(const FString &Text) = 0;
32  virtual void WriteLineF(const FString &Text) = 0;
33 
34  virtual void InfoF(const FString &Text) = 0;
35  virtual void WarningF(const FString &Text) = 0;
36  virtual void ErrorF(const FString &Text) = 0;
37 
39  virtual void FatalF(const FString &Text) = 0;
40 
41 };
42 #endif // UE4
43 
virtual void Warning(const std::string &Text)=0
virtual void WriteLine(const std::string &Text)=0
virtual void Fatal(const std::string &Text)=0
Quits the current game with an error message.
virtual void Error(const std::string &Text)=0
virtual void Write(const std::string &Text)=0
virtual void Info(const std::string &Text)=0