#include <MsgFileOStream.h>
Inheritance diagram for MsgFileOStream:

Public Types | |
| typedef int | openmode |
Public Member Functions | |
| MsgFileOStream () | |
| MsgFileOStream (const char *name, openmode mode) | |
| ~MsgFileOStream () | |
| const char * | GetName () const |
| ostream & | Os () const |
| void | Close () |
Private Attributes | |
| string | fFileName |
| ofstream * | fOfstream |
|
|
Definition at line 44 of file MsgFileOStream.h. |
|
|
Definition at line 48 of file MsgFileOStream.h. 00048 { }
|
|
||||||||||||
|
Definition at line 25 of file MsgFileOStream.cxx. References fFileName, and fOfstream. 00025 : 00026 fFileName(name) 00027 { 00028 //====================================================================== 00029 // Purpose: Create an output file stream with a given name and open 00030 // the file using a specified mode 00031 // 00032 // Inputs: name - The name of the file to attach to this stream 00033 // mode - The mode to open the file with 00034 //====================================================================== 00035 // Open a file using this name 00036 00037 fOfstream = new ofstream(fFileName.c_str(), mode); 00038 }
|
|
|
Definition at line 42 of file MsgFileOStream.cxx. References fOfstream. 00043 {
00044 //======================================================================
00045 // Purpose: Destroy a file output stream
00046 //======================================================================
00047 // Flush and close the file
00048 fOfstream->flush();
00049 fOfstream->close();
00050 delete fOfstream;
00051 }
|
|
|
Reimplemented from MsgOStream. Definition at line 12 of file MsgFileOStream.cxx. References fOfstream, and MsgOStream::SubtractReference(). Referenced by MsgOStreamServiceValidate::TestMsgFileOStream(). 00013 {
00014 //======================================================================
00015 // Purpose: Register a close request for this file. Don't actually close
00016 // the file until all clients have registered requests
00017 //======================================================================
00018 if (SubtractReference()==0) {
00019 fOfstream->close();
00020 }
00021 }
|
|
|
Implements MsgOStream. Definition at line 55 of file MsgFileOStream.cxx. References fFileName. Referenced by MsgOStreamServiceValidate::TestMsgFileOStream(). 00056 {
00057 //======================================================================
00058 // Purpose: Return the name of this stream
00059 //======================================================================
00060 return fFileName.c_str();
00061 }
|
|
|
Implements MsgOStream. Definition at line 65 of file MsgFileOStream.cxx. Referenced by MsgOStreamServiceValidate::TestMsgFileOStream(). 00066 {
00067 //======================================================================
00068 // Purpose: Return the output stream connected to this stream
00069 //======================================================================
00070 return *fOfstream;
00071 }
|
|
|
Definition at line 56 of file MsgFileOStream.h. Referenced by GetName(), and MsgFileOStream(). |
|
|
Definition at line 57 of file MsgFileOStream.h. Referenced by Close(), MsgFileOStream(), and ~MsgFileOStream(). |
1.3.9.1