engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
FOutputDeviceFile类 参考

File output device (Note: Only works if ALLOW_LOG_FILE && !NO_LOGGING is true, otherwise Serialize does nothing). 更多...

#include <OutputDeviceFile.h>

继承自 FOutputDevice .

被 FIOSOutputDeviceFile 继承.

Public 成员函数

void Flush () override
 Flush the write cache so the file isn't truncated in case we crash right after calling this function.
 
 FOutputDeviceFile (const TCHAR *InFilename=nullptr, bool bDisableBackup=false, bool bAppendIfExists=false, bool bCreateWriterLazily=true)
 Constructor, initializing member variables. 更多...
 
const TCHAR * GetFilename () const
 Returns the filename associated with this output device
 
void IncludeCategory (const class FName &InCategoryName)
 Add a category name to our inclusion filter. 更多...
 
void SetFilename (const TCHAR *InFilename)
 Sets the filename that the output device writes to. 更多...
 
void TearDown () override
 Closes output device and cleans up. 更多...
 
 ~FOutputDeviceFile ()
 Destructor to perform teardown 更多...
 

静态 Public 成员函数

static void CreateBackupCopy (const TCHAR *Filename)
 Creates a backup copy of a log file if it already exists
 
static bool IsBackupCopy (const TCHAR *Filename)
 Checks if the filename represents a backup copy of a log file
 

详细描述

File output device (Note: Only works if ALLOW_LOG_FILE && !NO_LOGGING is true, otherwise Serialize does nothing).

构造及析构函数说明

◆ FOutputDeviceFile()

FOutputDeviceFile::FOutputDeviceFile ( const TCHAR *  InFilename = nullptr,
bool  bDisableBackup = false,
bool  bAppendIfExists = false,
bool  bCreateWriterLazily = true 
)

Constructor, initializing member variables.

参数
InFilenameFilename to use, can be nullptr. If null, a file name will be automatically generated. If a filename is specified but cannot be opened because it is already open/used by another process, the implementation will try to generate a new name automatically, until the a file is created or the number of trials exhausted (32).
bDisableBackupIf true, existing files will not be backed up
bCreateWriterLazilyIf true, delay the creation of the file until something needs to be written, otherwise, open it immediatedly.

◆ ~FOutputDeviceFile()

FOutputDeviceFile::~FOutputDeviceFile ( )

Destructor to perform teardown

成员函数说明

◆ IncludeCategory()

void FOutputDeviceFile::IncludeCategory ( const class FName &  InCategoryName)

Add a category name to our inclusion filter.

As soon as one inclusion exists, all others will be ignored

◆ SetFilename()

void FOutputDeviceFile::SetFilename ( const TCHAR *  InFilename)

Sets the filename that the output device writes to.

If the output device was already writing to a file, closes that file.

◆ TearDown()

void FOutputDeviceFile::TearDown ( )
override

Closes output device and cleans up.

This can't happen in the destructor as we have to call "delete" which cannot be done for static/ global objects.


该类的文档由以下文件生成: