ccTraceFile |
09/08/99 |
Author:
Daniel.Lindh@Home.se ICQ: 7983755 HOMEPAGE: home.bip.net/CyberCow Copyright © Cyber Cow 1995 - 1999. OverView |
Overview |
#include <ccTraceFile.h> Hierarchy Chart
|
Class Members | ||||||||||||||||||||||||||||||||||||
Data Items: Private:
Construction Public:
Properies Public:
Protected:
Private:
Input/Output Public:
Protected:
Private:
Status Public:
Protected:
Private:
|
ccTraceFile::ccTraceFile | ||||
ccTraceFile(); Return Value:
Arguments:
Remarks: Default Constructor - Example: ccTraceFile oTraceFile; |
ccTraceFile::enableLogging | ||||||
E_ccErrRet enableLogging( BOOL abEnable = TRUE, BOOL abAppend = FALSE ); Return Value:
Arguments:
Remarks: This member will open the trace file and turn on the trace, or close the trace file and turn off the trace. A new file will be created if the trace file doesn't exist. If the trace file exist, it can be truncated or opened for appending. If the filename isn't set, the name ".\ccTrace.trc" will be used. Example: ccTraceFile oTraceFile; ... oTraceFile.enableLogging( FALSE ); |
ccTraceFile::setFileName | ||||
void setFileName( CString asFileName ); Return Value:
Arguments:
Remarks: Sets the name of the traceFile. If the traceing is on, it will be turned off and then turned on again with the new filename. And new messages will be appened to the end of the file. Example: ccTraceFile oTraceFile; |
ccTraceFile::browseTraceFile | ||||
void browseTraceFile(); Return Value:
Arguments:
Remarks: Opening a save as dialog, from which the user can select the trace file name. The new name will be set with the setFileName member. Example: ccTraceFile oTraceFile; |
ccTraceFile::getFileName | ||||
CString getFileName(); Return Value:
Arguments:
Remarks: Get the name of the traceFile. Example: ccTraceFile oTraceFile; |
ccTraceFile::addMessage | ||||
void addMessage( CString asMessage ); Return Value:
Arguments:
Remarks: This member adds a message to the traceFile. If the traceFile is closed the member will just throw away the message. The message format will be the following "12/24/99 11:23:59 This is the message." This member will also check if the log file is full, and if it is close the file and show an error message. Example: ccTraceFile oTraceFile; oTraceFile.addMessage( "Test Message" ); oTraceFile.enableLogging( FALSE ); |
ccTraceFile::view | ||||
void view(); Return Value:
Arguments:
Remarks: This will disable the tracing and display the traceFile in notepad. Example: ccTraceFile oTraceFile; oTraceFile.addMessage( "Test Message" ); oTraceFile.view(); |
ccTraceFile::clear | ||||
void clear(); Return Value:
Arguments:
Remarks: This will clear the trace file. It it was opened it will be remain opened. If it was closed it will remain closed. Example: ccTraceFile oTraceFile; oTraceFile.addMessage( "Test Message" ); oTraceFile.clear(); oTraceFile.view(); |
ccTraceFile::isTraceing | ||||
BOOL isTraceing( ); Return Value:
Arguments:
Remarks: This member will tell if the file logging is enabled. Example: ccTraceFile oTraceFile;
if ( oTraceFile.istraceing() ) |
ccTraceFile::setLogSize | ||||
void setLogSize( int aiLogSize ); Return Value:
Arguments:
Remarks: The size of the log file in kilo bytes. Example: ccTraceFile oTraceFile; |
ccTraceFile::getLogSize | ||||
int getLogSize( ); Return Value:
Arguments:
Remarks: This member will return the max size of the log file in kilo bytes. Example: ccTraceFile oTraceFile; |