ns3::SatInputFileStreamWrapper Class Reference

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

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

+ Inheritance diagram for ns3::SatInputFileStreamWrapper:
+ Collaboration diagram for ns3::SatInputFileStreamWrapper:

Public Member Functions

 SatInputFileStreamWrapper (std::string filename, std::ios::openmode filemode)
 Constructor. More...
 
 ~SatInputFileStreamWrapper ()
 Destructor. More...
 
std::ifstream * GetStream (void)
 Return a pointer to an ifstream previously set in the wrapper. More...
 

Private Attributes

bool m_destroyable
 Is the stream destroyable. More...
 
std::ifstream * m_ifstream
 Input file stream. More...
 

Detailed Description

A class encapsulating an STL input stream.

This class wraps a pointer to a C++ std::ifstream 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-input-fstream-wrapper.h.

Constructor & Destructor Documentation

◆ SatInputFileStreamWrapper()

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

Constructor.

Parameters
filenamefile name
filemodefile mode

Definition at line 33 of file satellite-input-fstream-wrapper.cc.

References m_ifstream.

◆ ~SatInputFileStreamWrapper()

ns3::SatInputFileStreamWrapper::~SatInputFileStreamWrapper ( )

Destructor.

Definition at line 48 of file satellite-input-fstream-wrapper.cc.

References m_destroyable, and m_ifstream.

Member Function Documentation

◆ GetStream()

std::ifstream * ns3::SatInputFileStreamWrapper::GetStream ( void  )

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

Returns
a pointer to the encapsulated std::ifstream

Definition at line 61 of file satellite-input-fstream-wrapper.cc.

References m_ifstream.

Referenced by ns3::SatInputFileStreamTimeDoubleContainer::UpdateContainer(), and ns3::SatInputFileStreamTimeLongDoubleContainer::UpdateContainer().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_destroyable

bool ns3::SatInputFileStreamWrapper::m_destroyable
private

Is the stream destroyable.

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

Referenced by ~SatInputFileStreamWrapper().

◆ m_ifstream

std::ifstream* ns3::SatInputFileStreamWrapper::m_ifstream
private

Input file stream.

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

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


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