3 #include "CoreMinimal.h" 4 #include "Modules/ModuleInterface.h" 5 #include "Modules/ModuleManager.h" 7 #if defined(_WIN32) || defined(_WIN64) 9 #pragma warning(disable:4002) 10 #pragma warning(disable:4003) 13 #include "unreal/unrealModule.pmh" 15 #if defined(_WIN32) || defined(_WIN64) 19 inline void UnrealLogString(
fe::String a_string)
21 UE_LOG(LogTemp,Display,TEXT(
"%s"),*FString(a_string.
c_str()));
24 inline void UnrealPrintFunction(
const char* a_ascii)
26 UnrealLogString(
fe::String(a_ascii).chop(
"\n"));
29 class FE_DL_PUBLIC UnrealLog:
public fe::Log 33 virtual ~UnrealLog(
void) {}
37 virtual void log(
const std::string &a_message)
40 a_message.c_str()).chop(
"\n");
46 UnrealLogString(m_preface+trim);
50 { m_preface=a_preface; }
61 class IFEOps :
public IModuleInterface
77 return FModuleManager::LoadModuleChecked< IFEOps >(
"FEOps");
88 return FModuleManager::Get().IsModuleLoaded(
"FEOps");
97 FEASSERT(spSingleMaster.isValid());
103 #if FE_OS==FE_WIN32 || FE_OS==FE_WIN64 104 UnrealLogString(
"ResetFeLogger");
107 fe::setPrintFunction(&UnrealPrintFunction);
110 feLogger()->clearAll();
112 UnrealLog* pUnrealLogFe=
new UnrealLog();
113 pUnrealLogFe->setPreface(
"fe ");
114 feLogger()->setLog(
"unreal_fe", pUnrealLogFe);
115 feLogger()->bind(
".*",
"unreal_fe");
117 UnrealLog* pUnrealLogLua=
new UnrealLog();
118 pUnrealLogLua->setPreface(
"lua ");
119 feLogger()->setLog(
"unreal_lua", pUnrealLogLua);
120 feLogger()->bind(
"lua_script",
"unreal_lua");
121 feLogger()->antibind(
"lua_script",
"unreal_fe");
124 UnrealLog* pUnrealLogUnreal=
new UnrealLog();
125 pUnrealLogUnreal->setPreface(
"fe+ ");
126 feLogger()->setLog(
"unreal", pUnrealLogUnreal);
127 feLogger()->bind(
"unreal_plugins",
"unreal");
128 feLogger()->antibind(
"unreal_plugins",
"unreal_fe");
131 #if FE_COMPILER==FE_GNU && !defined(__clang__) 132 #pragma GCC diagnostic push 133 #pragma GCC diagnostic ignored "-Wconditionally-supported" 137 #if FE_COMPILER==FE_GNU && !defined(__clang__) 138 #pragma GCC diagnostic pop 143 feLog(
"(IFEOps) ::UnrealGetSingleMaster loadPath \"%s\"\n",
151 spRegistry->manage(
"fexOperatorDL");
152 spRegistry->manage(
"fexVegetationDL");
158 return spSingleMaster;
C++ portion of logging interface implementation.
Definition: debug.h:292
const FESTRING_I8 * c_str(void) const
Return the contents of the 8-bit buffer cast as signed bytes.
Definition: String.h:352
static String FE_CDECL getLoadPath(void *a_symbol, BWORD a_prune)
Get the full path to the symbol's library.
Definition: System.cc:214
String prechop(const String &prefix) const
Return the substring after the prefix.
Definition: String.cc:118
static Result addPath(String a_absPath)
Add a path search for managed dynamic libraries.
Definition: DL_Loader.cc:116
Automatically reference-counted string container.
Definition: String.h:128
The public interface to this module.
Definition: IFEOps.h:61
String pathname(void) const
Return the substring preceding the last '/'.
Definition: String.cc:77
static IFEOps & Get()
Singleton-like access to this module's interface.
Definition: IFEOps.h:75
static bool IsAvailable()
Checks to see if this module is loaded and ready.
Definition: IFEOps.h:86
Base class for logging system Log objects.
Definition: debug.h:24