A class encapsulating an STL output stream. More...
#include "satellite-output-fstream-wrapper.h"
Public Member Functions | |
SatOutputFileStreamWrapper (std::string filename, std::ios::openmode filemode) | |
Constructor. More... | |
~SatOutputFileStreamWrapper () | |
Destructor. More... | |
std::ofstream * | GetStream (void) |
Return a pointer to an ofstream previously set in the wrapper. More... | |
Private Attributes | |
bool | m_destroyable |
Is the stream destroyable. More... | |
std::ofstream * | m_ofstream |
Output file stream. More... | |
A class encapsulating an STL output stream.
This class wraps a pointer to a C++ std::ofstream and provides reference counting of the object.
This class uses a basic ns-3 reference counting base class but is not an ns3::Object with attributes, TypeId, or aggregation.
Definition at line 41 of file satellite-output-fstream-wrapper.h.
ns3::SatOutputFileStreamWrapper::SatOutputFileStreamWrapper | ( | std::string | filename, |
std::ios::openmode | filemode | ||
) |
Constructor.
filename | file name |
filemode | file mode |
Definition at line 35 of file satellite-output-fstream-wrapper.cc.
References m_ofstream.
ns3::SatOutputFileStreamWrapper::~SatOutputFileStreamWrapper | ( | ) |
Destructor.
Definition at line 50 of file satellite-output-fstream-wrapper.cc.
References m_destroyable, and m_ofstream.
std::ofstream * ns3::SatOutputFileStreamWrapper::GetStream | ( | void | ) |
Return a pointer to an ofstream previously set in the wrapper.
Definition at line 65 of file satellite-output-fstream-wrapper.cc.
References m_ofstream.
Referenced by ns3::SatOutputFileStreamDoubleContainer::OpenStream(), ns3::SatOutputFileStreamLongDoubleContainer::OpenStream(), and ns3::SatOutputFileStreamStringContainer::OpenStream().
|
private |
Is the stream destroyable.
Definition at line 71 of file satellite-output-fstream-wrapper.h.
Referenced by ~SatOutputFileStreamWrapper().
|
private |
Output file stream.
Definition at line 66 of file satellite-output-fstream-wrapper.h.
Referenced by SatOutputFileStreamWrapper(), ~SatOutputFileStreamWrapper(), and GetStream().