Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
CLogFile Class Reference

#include <logfile.h>

List of all members.

Public Member Functions

 CLogFile ()
 ~CLogFile ()
BOOL create (char *filename, BOOL delete_existing=FALSE)
void close ()
DWORD write (char *buf)
void flush ()
 CLogFile ()
 ~CLogFile ()
BOOL create (LPSTR szFileName, BOOL bDeleteExisting=FALSE)
void close ()
DWORD write (LPSTR szBuf)
void flush ()

Private Attributes

char szFileName [256]
XP_HFILE hFile
char m_szFileName [256]
XP_HFILE m_hFile

Detailed Description

Definition at line 41 of file logfile.h.


Constructor & Destructor Documentation

Definition at line 43 of file logfile.cpp.

                   :
  hFile(NULL)
{
  szFileName[0] = '\0';
}

Definition at line 49 of file logfile.cpp.

{
  if(hFile != NULL)
    close();
}

Here is the call graph for this function:


Member Function Documentation

Definition at line 66 of file logfile.cpp.

{
  if(hFile != NULL)
  {
    XP_CloseFile(hFile);
    hFile = NULL;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL CLogFile::create ( char *  filename,
BOOL  delete_existing = FALSE 
)

Definition at line 55 of file logfile.cpp.

{
  strcpy(szFileName, filename);

  if(!delete_existing && XP_IsFile(szFileName))
      return FALSE;

  hFile = XP_CreateFile(szFileName);
  return (hFile != NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL CLogFile::create ( LPSTR  szFileName,
BOOL  bDeleteExisting = FALSE 
)

Definition at line 54 of file logfile.cpp.

{
  strcpy(m_szFileName, szFileName);

  if(XP_IsFile(m_szFileName))
  {
    if(!bDeleteExisting)
      return FALSE;
  }

  m_hFile = XP_CreateFile(m_szFileName);
  return (m_hFile != NULL);
}

Here is the call graph for this function:

Definition at line 80 of file logfile.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

DWORD CLogFile::write ( char *  buf)

Definition at line 75 of file logfile.cpp.

{
  return XP_WriteFile(hFile, buf, strlen(buf));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 77 of file logfile.cpp.

{
  return XP_WriteFile(m_hFile, szBuf, strlen(szBuf));
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 45 of file logfile.h.

Definition at line 47 of file logfile.h.

char CLogFile::m_szFileName[256] [private]

Definition at line 46 of file logfile.h.

char CLogFile::szFileName[256] [private]

Definition at line 44 of file logfile.h.


The documentation for this class was generated from the following files: