1. // src\FOutputDeviceStdOutput.h - ue serializer to console
  2. #pragma once // Copyright 2023 Alex0vSky (https://github.com/Alex0vSky)
  3. namespace prj_3d { namespace UePrjCreator {
  4. class FOutputDeviceStdOutput : public FOutputDevice {
  5. ELogTimes::Type *m_pPrintLogTimes;
  6. public:
  7. explicit FOutputDeviceStdOutput(ELogTimes::Type *pPrintLogTimes)
  8. : m_pPrintLogTimes( pPrintLogTimes )
  9. {}
  10.  
  11. virtual bool CanBeUsedOnAnyThread() const override {
  12. return true;
  13. }
  14.  
  15. virtual void Serialize(
  16. const TCHAR* V
  17. , ELogVerbosity::Type Verbosity
  18. , const class FName& Category
  19. ) override {
  20. FString line = FOutputDeviceHelper::FormatLogLine(
  21. Verbosity, Category, V
  22. , *m_pPrintLogTimes
  23. );
  24. wprintf( TEXT("%s\n"), *line );
  25. fflush( stdout );
  26. return;
  27. }
  28. };
  29. }} // namespace prj_3d::UePrjCreator

Generated by OpenCppCoverage (Version: 0.9.9.0)