ns3::SatOutputFileStreamWrapper Class Reference

A class encapsulating an STL output stream. More...

#include "satellite-output-fstream-wrapper.h"

+ Inheritance diagram for ns3::SatOutputFileStreamWrapper:
+ Collaboration diagram for ns3::SatOutputFileStreamWrapper:

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SatOutputFileStreamWrapper()

ns3::SatOutputFileStreamWrapper::SatOutputFileStreamWrapper ( std::string  filename,
std::ios::openmode  filemode 
)

Constructor.

Parameters
filenamefile name
filemodefile mode

Definition at line 34 of file satellite-output-fstream-wrapper.cc.

References m_ofstream.

◆ ~SatOutputFileStreamWrapper()

ns3::SatOutputFileStreamWrapper::~SatOutputFileStreamWrapper ( )

Destructor.

Definition at line 49 of file satellite-output-fstream-wrapper.cc.

References m_destroyable, and m_ofstream.

Member Function Documentation

◆ GetStream()

std::ofstream * ns3::SatOutputFileStreamWrapper::GetStream ( void  )

Return a pointer to an ofstream previously set in the wrapper.

Returns
a pointer to the encapsulated std::ofstream

Definition at line 64 of file satellite-output-fstream-wrapper.cc.

References m_ofstream.

Referenced by ns3::SatOutputFileStreamDoubleContainer::OpenStream(), ns3::SatOutputFileStreamLongDoubleContainer::OpenStream(), and ns3::SatOutputFileStreamStringContainer::OpenStream().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_destroyable

bool ns3::SatOutputFileStreamWrapper::m_destroyable
private

Is the stream destroyable.

Definition at line 71 of file satellite-output-fstream-wrapper.h.

Referenced by ~SatOutputFileStreamWrapper().

◆ m_ofstream

std::ofstream* ns3::SatOutputFileStreamWrapper::m_ofstream
private

Output file stream.

Definition at line 66 of file satellite-output-fstream-wrapper.h.

Referenced by SatOutputFileStreamWrapper(), ~SatOutputFileStreamWrapper(), and GetStream().


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