A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::Gnuplot3dFunction::Function3d Struct Reference

Structure storing the function to be used for a 3D plot. More...

+ Inheritance diagram for ns3::Gnuplot3dFunction::Function3d:
+ Collaboration diagram for ns3::Gnuplot3dFunction::Function3d:

Public Member Functions

 Function3d (const std::string &title, const std::string &function)
 Initializes with the function and title.
 
std::string GetCommand () const override
 Returns the plot type ("plot" or "splot").
 
bool IsEmpty () const override
 Checks to see if this GnuplotDataset is empty.
 
void PrintDataFile (std::ostream &os, bool generateOneOutputFile) const override
 Print the inline data file contents trailing the plot command.
 
void PrintExpression (std::ostream &os, bool generateOneOutputFile, unsigned int dataFileDatasetIndex, std::string &dataFileName) const override
 Prints the plot description used as argument to (s)plot.
 
- Public Member Functions inherited from ns3::GnuplotDataset::Data
 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_function
 Function to use.
 
- Public Attributes inherited from ns3::GnuplotDataset::Data
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 function to be used for a 3D plot.

Definition at line 647 of file gnuplot.cc.

Constructor & Destructor Documentation

◆ Function3d()

ns3::Gnuplot3dFunction::Function3d::Function3d ( const std::string &  title,
const std::string &  function 
)

Initializes with the function and title.

Parameters
titleTitle of the plot
functionFunction to plot

Definition at line 670 of file gnuplot.cc.

Member Function Documentation

◆ GetCommand()

std::string ns3::Gnuplot3dFunction::Function3d::GetCommand ( ) const
overridevirtual

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

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

Implements ns3::GnuplotDataset::Data.

Definition at line 677 of file gnuplot.cc.

◆ IsEmpty()

bool ns3::Gnuplot3dFunction::Function3d::IsEmpty ( ) const
overridevirtual

Checks to see if this GnuplotDataset is empty.

Returns
indicates if this GnuplotDataset is empty.

Implements ns3::GnuplotDataset::Data.

Definition at line 707 of file gnuplot.cc.

◆ PrintDataFile()

void ns3::Gnuplot3dFunction::Function3d::PrintDataFile ( std::ostream &  os,
bool  generateOneOutputFile 
) const
overridevirtual

Print the inline data file contents trailing the plot command.

Empty for functions.

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

Implements ns3::GnuplotDataset::Data.

Definition at line 702 of file gnuplot.cc.

◆ PrintExpression()

void ns3::Gnuplot3dFunction::Function3d::PrintExpression ( std::ostream &  os,
bool  generateOneOutputFile,
unsigned int  dataFileDatasetIndex,
std::string &  dataFileName 
) const
overridevirtual

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

Implements ns3::GnuplotDataset::Data.

Definition at line 683 of file gnuplot.cc.

Member Data Documentation

◆ m_function

std::string ns3::Gnuplot3dFunction::Function3d::m_function

Function to use.

Definition at line 651 of file gnuplot.cc.


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