A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::GnuplotDataset::Data Struct Referenceabstract

Structure storing the data to plot. More...

+ Inheritance diagram for ns3::GnuplotDataset::Data:
+ Collaboration diagram for ns3::GnuplotDataset::Data:

Public Member Functions

 Data (const std::string &title)
 Initializes the reference counter to 1 and sets m_title and m_extra.
 
virtual ~Data ()
 Required.
 
virtual std::string GetCommand () const =0
 Returns the plot type ("plot" or "splot").
 
virtual bool IsEmpty () const =0
 Checks to see if this GnuplotDataset is empty.
 
virtual void PrintDataFile (std::ostream &os, bool generateOneOutputFile) const =0
 Print the inline data file contents trailing the plot command.
 
virtual void PrintExpression (std::ostream &os, bool generateOneOutputFile, unsigned int dataFileDatasetIndex, std::string &dataFileName) const =0
 Prints the plot description used as argument to (s)plot.
 

Public Attributes

std::string m_extra
 Extra parameters for the plot.
 
unsigned int m_references
 ref/unref counter for garbage collection
 
std::string m_title
 Dataset title.
 

Detailed Description

Structure storing the data to plot.

Derived classes subclass this struct and add their own data fields.

Definition at line 27 of file gnuplot.cc.

Constructor & Destructor Documentation

◆ Data()

ns3::GnuplotDataset::Data::Data ( const std::string & title)

Initializes the reference counter to 1 and sets m_title and m_extra.

Parameters
titleDataset title

Definition at line 86 of file gnuplot.cc.

◆ ~Data()

ns3::GnuplotDataset::Data::~Data ( )
virtual

Required.

Definition at line 93 of file gnuplot.cc.

Member Function Documentation

◆ GetCommand()

virtual std::string ns3::GnuplotDataset::Data::GetCommand ( ) const
pure virtual

Returns the plot type ("plot" or "splot").

Returns
the plot type ("plot" or "splot").

Implemented in ns3::Gnuplot2dDataset::Data2d, ns3::Gnuplot2dFunction::Function2d, ns3::Gnuplot3dDataset::Data3d, and ns3::Gnuplot3dFunction::Function3d.

◆ IsEmpty()

virtual bool ns3::GnuplotDataset::Data::IsEmpty ( ) const
pure virtual

◆ PrintDataFile()

virtual void ns3::GnuplotDataset::Data::PrintDataFile ( std::ostream & os,
bool generateOneOutputFile ) const
pure virtual

Print the inline data file contents trailing the plot command.

Empty for functions.

Parameters
osOutput stream
generateOneOutputFileIf true, generate only one output file.

Implemented in ns3::Gnuplot2dDataset::Data2d, ns3::Gnuplot2dFunction::Function2d, ns3::Gnuplot3dDataset::Data3d, and ns3::Gnuplot3dFunction::Function3d.

◆ PrintExpression()

virtual void ns3::GnuplotDataset::Data::PrintExpression ( std::ostream & os,
bool generateOneOutputFile,
unsigned int dataFileDatasetIndex,
std::string & dataFileName ) const
pure virtual

Prints the plot description used as argument to (s)plot.

Either the function expression or a datafile description. Should include m_title and m_extra in the output.

If more than one output file is being generated, i.e. separate data and control files, then the index for the current dataset and the name for the data file are also included.

Parameters
osOutput stream
generateOneOutputFileIf true, generate only one output file.
dataFileDatasetIndexDataset Index
dataFileNameDataset file name

Implemented in ns3::Gnuplot2dDataset::Data2d, ns3::Gnuplot2dFunction::Function2d, ns3::Gnuplot3dDataset::Data3d, and ns3::Gnuplot3dFunction::Function3d.

Member Data Documentation

◆ m_extra

std::string ns3::GnuplotDataset::Data::m_extra

Extra parameters for the plot.

Definition at line 34 of file gnuplot.cc.

Referenced by ns3::GnuplotDataset::SetExtra().

◆ m_references

unsigned int ns3::GnuplotDataset::Data::m_references

ref/unref counter for garbage collection

Definition at line 31 of file gnuplot.cc.

Referenced by ns3::GnuplotDataset::GnuplotDataset(), ns3::GnuplotDataset::~GnuplotDataset(), and ns3::GnuplotDataset::operator=().

◆ m_title

std::string ns3::GnuplotDataset::Data::m_title

Dataset title.

Definition at line 33 of file gnuplot.cc.

Referenced by ns3::GnuplotDataset::SetTitle().


The documentation for this struct was generated from the following file: