FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fei_LogFile.hpp
1 /*--------------------------------------------------------------------*/
2 /* Copyright 2005 Sandia Corporation. */
3 /* Under the terms of Contract DE-AC04-94AL85000, there is a */
4 /* non-exclusive license for use of this work by or on behalf */
5 /* of the U.S. Government. Export of this program may require */
6 /* a license from the United States Government. */
7 /*--------------------------------------------------------------------*/
8 
9 #ifndef _fei_LogFile_hpp_
10 #define _fei_LogFile_hpp_
11 
12 #include "fei_iosfwd.hpp"
13 
14 namespace fei {
15 
19 class LogFile {
20  public:
22  virtual ~LogFile();
23 
35  void openOutputStream(const char* path=NULL,
36  int nprocs=1,
37  int localproc=0);
38 
40  FEI_OSTREAM* getOutputStream();
41 
44  void closeOutputStream();
45 
50  static LogFile& getLogFile();
51 
52  private:
54  LogFile();
55 
56  FEI_OSTREAM* output_stream_;
57  unsigned counter_;
58 }; //class LogFile
59 }//namespace fei
60 #endif
void openOutputStream(const char *path=NULL, int nprocs=1, int localproc=0)
Definition: fei_LogFile.cpp:27
FEI_OSTREAM * getOutputStream()
Definition: fei_LogFile.cpp:57
virtual ~LogFile()
Definition: fei_LogFile.cpp:21
void closeOutputStream()
Definition: fei_LogFile.cpp:62
static LogFile & getLogFile()
Definition: fei_LogFile.cpp:68