Filter Library Camera Interface Physics

CQAFDebug Class Reference

List of all members.

Detailed Description

Definition at line 205 of file QAFDebug.cpp.

Public Member Functions

 CQAFDebug ()
 Constructor. It does some complex initialization of memory shared files and instance pointers.
 ~CQAFDebug ()
 Destructor. It deinitializes the shared flags.

Static Public Member Functions

static HANDLE tryOpenLogFile (void)
 try open the log file, testing its size and moving it to the same log file if needed.
static bool tryEnable (void)
 try to enable the log
static bool tryDisable (void)
 try to disable the log
static bool isEnabled (void)
 Check if the debug log is enabled in the memory mapped file.
static LPCTSTR GetApplication ()
 Return a pointer to a null-terminated string with the application name and version.
static DWORD SetLogModule (HMODULE hModule, LPTSTR szOutputBuffer, DWORD dwBufSize)
 Get the full path and version number of the given module and record them in the output buffer.

Static Protected Member Functions

static DWORD qafGetLogFileName (LPTSTR szFilenameBuf, const DWORD dwMaxLen)
 Generate the file name and directory (check that the file is here).
static CQAFDebuginstance (void)
 Get the shared instance of the log class.

Private Attributes

TCHAR m_szLogFileName [MAX_PATH]
 Name of the log file, it is initialized by the constructor.
CRITICAL_SECTION m_cs
 Critical section is used for synchronization the class methods.
TCHAR m_szApplicationName [MAX_PATH]
 Application name.


Member Function Documentation

DWORD CQAFDebug::qafGetLogFileName ( LPTSTR  szFilenameBuf,
const DWORD  dwMaxLen 
) [static, protected]

Get the buffer and the buffer length in TCHAR characters including tailing 0x00(00). Returns the length of the written string or 0 if the file name cannot be generated. The file name is constructed from the: 1. Try get the folder path from the environment variable QAFDEBUG_LOG_ENV_VAR 2. Try CSIDL_APPDATA (C: and Settings Data) + QAFDEBUG_LOG_SUBFOLDER 3. Try CSIDL_COMMON_APPDATA (C: and Settings Users Data) + QAFDEBUG_LOG_SUBFOLDER 4. Return 0 If the folders are missing on the disk, they are created.

Definition at line 634 of file QAFDebug.cpp.

References QAFDebug::GetLogDir(), and QAFDEBUG_LOG_FILE_NAME.

static DWORD CQAFDebug::SetLogModule ( HMODULE  hModule,
LPTSTR  szOutputBuffer,
DWORD  dwBufSize 
) [inline, static]

The function returns the number of characters in the output buffer or 0 in a case of any error.

Definition at line 460 of file QAFDebug.cpp.

Referenced by QAFDebug::SetModule().


The documentation for this class was generated from the following file:
Camera Filter Library documentation © 2004-2007 by Leiden Probe Microscopy