Vis 2 Demo  1.0
Technical illustration type real-time rendering of geometry
 All Classes Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
LogFile Class Reference

This class provides logging service. More...

Public Member Functions

 LogFile (char *file_name, bool ovewrite)
 Constructor. More...
 
 ~LogFile ()
 Destructor. More...
 
bool valid () const
 
void print (const char *text)
 Writing function. More...
 

Protected Attributes

std::FILE * f
 pointer to the opened text file More...
 

Private Member Functions

 LogFile (const LogFile &)
 

Detailed Description

This class provides logging service.

A text file is opened in the directory of the EXE and all OPENGL calls are listed along with the date and time.
The file is closed in the destructor.

See Also
~LogFile()

Definition at line 13 of file LogFile.h.

Constructor & Destructor Documentation

LogFile::LogFile ( char *  file_name,
bool  ovewrite 
)

Constructor.

Parameters
[in]file_nameis the name of the log file
[in]ovewrite- if set true the content of the log file will be replaced on each run.
If the file "file_name" could be found or created, and opened, a pointer to it is saved in the protected member f.

Definition at line 4 of file LogFile.cpp.

LogFile::~LogFile ( )

Destructor.

Closes the log file to which the protected member f points.

Definition at line 17 of file LogFile.cpp.

LogFile::LogFile ( const LogFile )
private

Member Function Documentation

void LogFile::print ( const char *  text)

Writing function.

Parameters
[in]textis the message to be written.
If the log file does not exist or failed to open, nothing is written.

Definition at line 23 of file LogFile.cpp.

bool LogFile::valid ( ) const
inline
Returns
TRUE if the log file is open and ready for writing. Otherwise FALSE.

Definition at line 32 of file LogFile.h.

Member Data Documentation

std::FILE* LogFile::f
protected

pointer to the opened text file

Definition at line 41 of file LogFile.h.


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