📄 filelogger.h
字号:
/*
* ==============================================================================
* Name : CFileLogger
* Part of : AOExample
* Created : 6.5.2004 by Markus Pelkonen
* Description:
* Version :
* Copyright: Nokia
* ==============================================================================
*/
#ifndef FILELOGGER_H
#define FILELOGGER_H
#include <e32base.h>
#include <f32file.h>
_LIT( KDefaultLogFile, "c:\\FileLogger.txt" );
class CFileLogger : public CBase
{
public:
/**
* Factory method for construction. See ConstructL(const TDesC&) for
* detailed documentation.
*/
static CFileLogger* CFileLogger::NewL( const TDesC &logFileName = KDefaultLogFile );
/**
* Construct an instance of the MResultViewer that writes contents to
* the file specified by logFileName parameter. The file is opened at
* the construction time and kept open until object is destroyed.
*
* @param logFileName file name where contents are written.
*/
void ConstructL( const TDesC &logFileName = KDefaultLogFile );
/**
* Destroys the object and closes the file opened at construction time.
*/
virtual ~CFileLogger();
/**
* Flushes the internal buffer to the file and resets the iBuf;
* @see MResultViewer::UpdateView().
*/
virtual void Flush();
public:
TBuf<1024> iBuf;
private:
RFs iFsSession;
RFile iFile;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -