23 #include "ns3/abort.h"
25 #include "ns3/simulator.h"
27 NS_LOG_COMPONENT_DEFINE(
"SatOutputFileStreamStringContainer");
35 static TypeId tid = TypeId(
"ns3::SatOutputFileStreamStringContainer")
37 .AddConstructor<SatOutputFileStreamStringContainer>();
42 std::ios::openmode filemode)
43 : m_outputFileStreamWrapper(),
53 : m_outputFileStreamWrapper(),
59 NS_LOG_FUNCTION(
this);
60 NS_FATAL_ERROR(
"SatOutputFileStreamStringContainer::SatOutputFileStreamStringContainer - "
61 "Constructor not in use");
66 NS_LOG_FUNCTION(
this);
74 NS_LOG_FUNCTION(
this);
83 NS_LOG_FUNCTION(
this);
97 NS_ABORT_MSG(
"Output stream is not valid for writing.");
106 NS_LOG_FUNCTION(
this);
114 NS_LOG_FUNCTION(
this);
123 NS_LOG_FUNCTION(
this);
132 NS_LOG_FUNCTION(
this);
148 NS_LOG_FUNCTION(
this);
SatOutputFileStreamStringContainer()
Constructor.
~SatOutputFileStreamStringContainer()
Destructor.
void AddToContainer(std::string newLine)
Function for adding the line to container.
std::string m_fileName
File name.
void DoDispose()
Do needed dispose actions.
std::ios::openmode m_fileMode
File mode.
void Reset()
Function for resetting the variables.
void OpenStream()
Function for opening the output file stream.
void WriteContainerToFile()
Function for writing the container contents to file.
std::ofstream * m_outputFileStream
Pointer to output file stream.
void ResetStream()
Function for resetting the stream.
std::vector< std::string > m_container
Container for lines.
static TypeId GetTypeId(void)
NS-3 function for type id.
SatOutputFileStreamWrapper * m_outputFileStreamWrapper
Pointer to output file stream wrapper.
void ClearContainer()
Function for clearing the container.
A class encapsulating an STL output stream.
std::ofstream * GetStream(void)
Return a pointer to an ofstream previously set in the wrapper.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.