A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::GnuplotDataset Class Reference

Abstract class to store a plot line to be used by ns3::Gnuplot. More...

#include "gnuplot.h"

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

Classes

struct  Data
 Structure storing the data to plot. More...
 

Public Member Functions

 GnuplotDataset (const GnuplotDataset &original)
 Reference-counting copy constructor.
 
 GnuplotDataset (const GnuplotDataset &original)
 Reference-counting copy constructor.
 
 ~GnuplotDataset ()
 Reference-counting destructor.
 
 ~GnuplotDataset ()
 Reference-counting destructor.
 
GnuplotDatasetoperator= (const GnuplotDataset &original)
 Reference-counting assignment operator.
 
GnuplotDatasetoperator= (const GnuplotDataset &original)
 Reference-counting assignment operator.
 
void SetExtra (const std::string &extra)
 Add extra formatting parameters to this dataset.
 
void SetExtra (const std::string &extra)
 Add extra formatting parameters to this dataset.
 
void SetTitle (const std::string &title)
 Change line title.
 
void SetTitle (const std::string &title)
 Change line title.
 

Static Public Member Functions

static void SetDefaultExtra (const std::string &extra)
 Change extra formatting style parameters for newly created objects.
 
static void SetDefaultExtra (const std::string &extra)
 Change extra formatting style parameters for newly created objects.
 

Protected Member Functions

 GnuplotDataset (Data *data)
 Called by constructors of derived classes.
 
 GnuplotDataset (Data *data)
 Called by constructors of derived classes.
 

Protected Attributes

Datam_data
 Reference counted data object.
 

Static Protected Attributes

static std::string m_defaultExtra = ""
 Extra gnuplot parameters set on every newly created dataset.
 

Friends

class Gnuplot
 Friend because it accesses m_data and it's virtual functions directly in GenerateOutput().
 

Detailed Description

Abstract class to store a plot line to be used by ns3::Gnuplot.

This class contains a reference counted data object in m_data. The data object contains different structs derived from struct Data by subclasses.

Definition at line 27 of file gnuplot.h.

Constructor & Destructor Documentation

◆ GnuplotDataset() [1/4]

ns3::GnuplotDataset::GnuplotDataset ( const GnuplotDataset original)

Reference-counting copy constructor.

Parameters
originalOriginal GnuPlotDataset

Definition at line 106 of file gnuplot.cc.

References m_data, and ns3::GnuplotDataset::Data::m_references.

◆ ~GnuplotDataset() [1/2]

ns3::GnuplotDataset::~GnuplotDataset ( )

Reference-counting destructor.

Definition at line 112 of file gnuplot.cc.

References m_data, and ns3::GnuplotDataset::Data::m_references.

◆ GnuplotDataset() [2/4]

ns3::GnuplotDataset::GnuplotDataset ( Data data)
protected

Called by constructors of derived classes.

Parameters
datathe reference counted data object representing this dataset.

Definition at line 101 of file gnuplot.cc.

◆ GnuplotDataset() [3/4]

ns3::GnuplotDataset::GnuplotDataset ( const GnuplotDataset original)

Reference-counting copy constructor.

Parameters
originalOriginal GnuPlotDataset

◆ ~GnuplotDataset() [2/2]

ns3::GnuplotDataset::~GnuplotDataset ( )

Reference-counting destructor.

◆ GnuplotDataset() [4/4]

ns3::GnuplotDataset::GnuplotDataset ( Data data)
protected

Called by constructors of derived classes.

Parameters
datathe reference counted data object representing this dataset.

Member Function Documentation

◆ operator=() [1/2]

GnuplotDataset & ns3::GnuplotDataset::operator= ( const GnuplotDataset original)

Reference-counting assignment operator.

Parameters
originalRight-hand side of assignment operator
Returns
Copy of original GnuplotDataset

Definition at line 121 of file gnuplot.cc.

References ns3::Create(), m_data, and ns3::GnuplotDataset::Data::m_references.

+ Here is the call graph for this function:

◆ operator=() [2/2]

GnuplotDataset & ns3::GnuplotDataset::operator= ( const GnuplotDataset original)

Reference-counting assignment operator.

Parameters
originalRight-hand side of assignment operator
Returns
Copy of original GnuplotDataset

◆ SetDefaultExtra() [1/2]

void ns3::GnuplotDataset::SetDefaultExtra ( const std::string &  extra)
static

Change extra formatting style parameters for newly created objects.

Parameters
extraextra formatting

Definition at line 143 of file gnuplot.cc.

References ns3::Create(), and m_defaultExtra.

Referenced by ns3::GnuplotAggregator::Set2dDatasetDefaultExtra().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetDefaultExtra() [2/2]

static void ns3::GnuplotDataset::SetDefaultExtra ( const std::string &  extra)
static

Change extra formatting style parameters for newly created objects.

Parameters
extraextra formatting

◆ SetExtra() [1/2]

void ns3::GnuplotDataset::SetExtra ( const std::string &  extra)

Add extra formatting parameters to this dataset.

Parameters
extraextra formatting

Definition at line 149 of file gnuplot.cc.

References ns3::Create(), m_data, and ns3::GnuplotDataset::Data::m_extra.

Referenced by ns3::QKDGraph::QKDGraph(), and ns3::QKDTotalGraph::Init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetExtra() [2/2]

void ns3::GnuplotDataset::SetExtra ( const std::string &  extra)

Add extra formatting parameters to this dataset.

Parameters
extraextra formatting

◆ SetTitle() [1/2]

void ns3::GnuplotDataset::SetTitle ( const std::string &  title)

Change line title.

Parameters
titlethe new title string to use for this dataset.
Note
If you want your title to contain a newline character, escape it like this: "First line\\nSecond line" so that it is converted to "First line\nSecond line" in the plot file.

Definition at line 137 of file gnuplot.cc.

References m_data, and ns3::GnuplotDataset::Data::m_title.

Referenced by NodeStatistics::NodeStatistics(), ns3::QKDGraph::QKDGraph(), anonymous_namespace{gnuplot-example.cc}::Create2DPlotFile(), anonymous_namespace{gnuplot-example.cc}::Create2DPlotWithErrorBarsFile(), anonymous_namespace{gnuplot-example.cc}::Create3DPlotFile(), Ns3TcpCubicTestCase::DoRun(), and ns3::QKDTotalGraph::Init().

+ Here is the caller graph for this function:

◆ SetTitle() [2/2]

void ns3::GnuplotDataset::SetTitle ( const std::string &  title)

Change line title.

Parameters
titlethe new title string to use for this dataset.
Note
If you want your title to contain a newline character, escape it like this: "First line\\nSecond line" so that it is converted to "First line\nSecond line" in the plot file.

Friends And Related Symbol Documentation

◆ Gnuplot

Gnuplot
friend

Friend because it accesses m_data and it's virtual functions directly in GenerateOutput().

Definition at line 73 of file gnuplot.h.

Member Data Documentation

◆ m_data

◆ m_defaultExtra

static std::string ns3::GnuplotDataset::m_defaultExtra = ""
staticprotected

Extra gnuplot parameters set on every newly created dataset.

Definition at line 78 of file gnuplot.h.

Referenced by SetDefaultExtra().


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