Loading...
Searching...
No Matches
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.
 ~SatOutputFileStreamWrapper ()
 Destructor.
std::ofstream * GetStream (void)
 Return a pointer to an ofstream previously set in the wrapper.

Private Attributes

bool m_destroyable
 Is the stream destroyable.
std::ofstream * m_ofstream
 Output file stream.

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 35 of file satellite-output-fstream-wrapper.cc.

References m_destroyable, and m_ofstream.

◆ ~SatOutputFileStreamWrapper()

ns3::SatOutputFileStreamWrapper::~SatOutputFileStreamWrapper ( )

Destructor.

Definition at line 50 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 65 of file satellite-output-fstream-wrapper.cc.

References m_ofstream.

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(), and ~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: