FEI Version of the Day
Public Member Functions | Static Public Member Functions
fei::LogFile Class Reference

#include <fei_LogFile.hpp>

List of all members.

Public Member Functions

virtual ~LogFile ()
void openOutputStream (const char *path=NULL, int nprocs=1, int localproc=0)
FEI_OSTREAM * getOutputStream ()
void closeOutputStream ()

Static Public Member Functions

static LogFilegetLogFile ()

Detailed Description

Singleton class to manage (open, close, etc.) the one-and-only fei log file.

Definition at line 54 of file fei_LogFile.hpp.


Constructor & Destructor Documentation

fei::LogFile::~LogFile ( ) [virtual]

destructor

Definition at line 56 of file fei_LogFile.cpp.


Member Function Documentation

void fei::LogFile::openOutputStream ( const char *  path = NULL,
int  nprocs = 1,
int  localproc = 0 
)

Open a log-file ostream. If one is already open, it is closed before the new one is opened.

The file name is 'fei_log.counter.nprocs.localproc', where counter is the number of times this function has been called, and nprocs and localproc are specified in the arguments.

Parameters:
pathPath, not including file-name, to log-file.
nprocsNumber of processors.
localprocRank of local processor.

Definition at line 62 of file fei_LogFile.cpp.

FEI_OSTREAM * fei::LogFile::getOutputStream ( )

Query for the log-file ostream.

Definition at line 92 of file fei_LogFile.cpp.

void fei::LogFile::closeOutputStream ( )

Destroy the log-file ostream (closes the file).

Definition at line 97 of file fei_LogFile.cpp.

fei::LogFile & fei::LogFile::getLogFile ( ) [static]

Accessor for the one-and-only instance of LogFile. Constructs a LogFile instance on the first call, returns that same instance on the first and all subsequent calls.

Definition at line 103 of file fei_LogFile.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends