23 #include "ns3/abort.h"
25 #include "ns3/simulator.h"
29 NS_LOG_COMPONENT_DEFINE(
"SatOutputFileStreamStringContainer");
37 static TypeId tid = TypeId(
"ns3::SatOutputFileStreamStringContainer")
39 .AddConstructor<SatOutputFileStreamStringContainer>();
44 std::ios::openmode filemode)
45 : m_outputFileStreamWrapper(),
55 : m_outputFileStreamWrapper(),
61 NS_LOG_FUNCTION(
this);
62 NS_FATAL_ERROR(
"SatOutputFileStreamStringContainer::SatOutputFileStreamStringContainer - "
63 "Constructor not in use");
68 NS_LOG_FUNCTION(
this);
76 NS_LOG_FUNCTION(
this);
85 NS_LOG_FUNCTION(
this);
99 NS_ABORT_MSG(
"Output stream is not valid for writing.");
108 NS_LOG_FUNCTION(
this);
116 NS_LOG_FUNCTION(
this);
125 NS_LOG_FUNCTION(
this);
134 NS_LOG_FUNCTION(
this);
150 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.