FEBio  1.5.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes
Logfile Class Reference

Class that is used for logging purposes. More...

#include <Logfile.h>

Public Types

enum  MODE { NEVER = 0, FILE_ONLY = 1, SCREEN_ONLY, FILE_AND_SCREEN }

Public Member Functions

virtual ~Logfile ()
 destructor
bool open (const char *szfile)
 open a new logfile
bool append (const char *szfile)
 append to existing file
void printf (const char *sz,...)
 formatted printing
void printbox (const char *sztitle, const char *sz,...)
 print a nice box
MODE SetMode (MODE mode)
 set the loggin mode
MODE GetMode ()
 get the loggin mode
void flush ()
 flush the logfile
const char * FileName ()
 return the file name
 operator FILE * ()
 return a file pointer
bool is_valid ()
 returns if the logfile is ready to be written to

Static Public Member Functions

static LogfileGetInstance ()
 obtain a pointer to the logfile

Protected Attributes

FILE * m_fp
 the actual log file
MODE m_mode
 mode of log file
char m_szfile [256]
 file name of logfile

Static Protected Attributes

static Logfilem_plog = 0
 the one and only logfile

Detailed Description

Class that is used for logging purposes.

This class can output to different files at the same time. In FEBio, it is used for logging purposes. At this time it outputs data to the screen (stdout) and to an external text file. Note that this class is implemented as a singleton, in other words, only one instance can be created.


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