A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::GnuplotCollection Class Reference

a simple class to group together multiple gnuplots into one file, e.g. for PDF multi-page output terminals. More...

#include <gnuplot.h>

+ Collaboration diagram for ns3::GnuplotCollection:

Public Member Functions

 GnuplotCollection (const std::string &outputFilename)
 
void AddPlot (const Gnuplot &plot)
 
void GenerateOutput (std::ostream &os)
 
void GenerateOutput (std::ostream &osControl, std::ostream &osData, std::string dataFileName)
 
GnuplotGetPlot (unsigned int id)
 
void SetTerminal (const std::string &terminal)
 

Private Types

typedef std::vector< GnuplotPlots
 

Private Attributes

std::string m_outputFilename
 
Plots m_plots
 
std::string m_terminal
 

Detailed Description

a simple class to group together multiple gnuplots into one file, e.g. for PDF multi-page output terminals.

Definition at line 455 of file gnuplot.h.

Member Typedef Documentation

typedef std::vector<Gnuplot> ns3::GnuplotCollection::Plots
private

Definition at line 503 of file gnuplot.h.

Constructor & Destructor Documentation

ns3::GnuplotCollection::GnuplotCollection ( const std::string &  outputFilename)
Parameters
outputFilenamethe name of the file where the rendering of the graph will be generated if you feed the command stream output by GnuplotCollection::GenerateOutput to the gnuplot program.

Definition at line 811 of file gnuplot.cc.

Member Function Documentation

void ns3::GnuplotCollection::AddPlot ( const Gnuplot plot)
Parameters
plotadd a plot to the collection to be plotted.

Definition at line 824 of file gnuplot.cc.

References m_plots.

Referenced by main().

+ Here is the caller graph for this function:

void ns3::GnuplotCollection::GenerateOutput ( std::ostream &  os)
Parameters
osthe output stream on which the relevant gnuplot commands should be generated.

Definition at line 839 of file gnuplot.cc.

References m_outputFilename, m_plots, and m_terminal.

Referenced by main().

+ Here is the caller graph for this function:

void ns3::GnuplotCollection::GenerateOutput ( std::ostream &  osControl,
std::ostream &  osData,
std::string  dataFileName 
)
Parameters
osControlthe output stream on which the relevant gnuplot contol commands should be generated. Including output file and terminal headers.
osDatathe output stream on which the relevant gnuplot data values should be generated.
dataFileNamethe name for the data file that will be written.

Definition at line 857 of file gnuplot.cc.

References m_outputFilename, m_plots, and m_terminal.

Gnuplot & ns3::GnuplotCollection::GetPlot ( unsigned int  id)

Return a pointer to one of the added plots.

Parameters
idindex of plot to return
Returns
reference to plot, throws std::range_error if it does not exist.

Definition at line 830 of file gnuplot.cc.

References m_plots.

void ns3::GnuplotCollection::SetTerminal ( const std::string &  terminal)
Parameters
terminalterminal setting string for output. The default terminal string is guessed from the output filename's extension.

Definition at line 818 of file gnuplot.cc.

References m_terminal.

Referenced by main().

+ Here is the caller graph for this function:

Member Data Documentation

std::string ns3::GnuplotCollection::m_outputFilename
private

Definition at line 505 of file gnuplot.h.

Referenced by GenerateOutput().

Plots ns3::GnuplotCollection::m_plots
private

Definition at line 508 of file gnuplot.h.

Referenced by AddPlot(), GenerateOutput(), and GetPlot().

std::string ns3::GnuplotCollection::m_terminal
private

Definition at line 506 of file gnuplot.h.

Referenced by GenerateOutput(), and SetTerminal().


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