core, config-store, stats: Fix clang-tidy modernize-use-override warnings

This commit is contained in:
Eduardo Almeida
2022-10-28 12:39:58 +00:00
parent 902e1d43b3
commit f8516626df
4 changed files with 67 additions and 67 deletions

View File

@@ -83,19 +83,19 @@ class ModelTypeidCreator : public AttributeDefaultIterator
* \param defaultValue default value
* \param index index of the attribute in the specified Typeid
*/
virtual void VisitAttribute(TypeId tid,
void VisitAttribute(TypeId tid,
std::string name,
std::string defaultValue,
uint32_t index);
uint32_t index) override;
/**
* \brief Add a node for the new TypeId object
* \param name TypeId name
*/
virtual void StartVisitTypeId(std::string name);
void StartVisitTypeId(std::string name) override;
/**
* \brief Remove the last gtk tree iterator
*/
virtual void EndVisitTypeId();
void EndVisitTypeId() override;
/**
* \brief Adds a treestore iterator to m_treestore model
* \param node the node to be added

View File

@@ -85,7 +85,7 @@ class TestCaseBase : public TestCase
* \param [in] start The minimum value of the lowest bin.
* \param [in] end The maximum value of the last bin.
* \param [in] underflow If \c true the lowest bin should contain the underflow,
* \param [in] overflow If \c ture the highest bin should contain the overflow.
* \param [in] overflow If \c true the highest bin should contain the overflow.
* \returns A vector of the bin edges, including the top of the highest bin.
* This vector has one more entry than the number of bins in the histogram.
*/
@@ -168,7 +168,7 @@ class TestCaseBase : public TestCase
}
// Inherited
Ptr<RandomVariableStream> Create() const
Ptr<RandomVariableStream> Create() const override
{
auto rng = CreateObject<RNG>();
rng->SetAttribute("Antithetic", BooleanValue(m_anti));
@@ -354,11 +354,11 @@ class UniformTestCase : public TestCaseBase
UniformTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
};
UniformTestCase::UniformTestCase()
@@ -476,11 +476,11 @@ class UniformAntitheticTestCase : public TestCaseBase
UniformAntitheticTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
};
UniformAntitheticTestCase::UniformAntitheticTestCase()
@@ -552,7 +552,7 @@ class ConstantTestCase : public TestCaseBase
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/** Tolerance for testing rng values against expectation. */
static constexpr double TOLERANCE{1e-8};
@@ -603,7 +603,7 @@ class SequentialTestCase : public TestCaseBase
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/** Tolerance for testing rng values against expectation. */
static constexpr double TOLERANCE{1e-8};
@@ -659,11 +659,11 @@ class NormalTestCase : public TestCaseBase
NormalTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/** Tolerance for testing rng values against expectation, in rms. */
static constexpr double TOLERANCE{5};
@@ -745,11 +745,11 @@ class NormalAntitheticTestCase : public TestCaseBase
NormalAntitheticTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/** Tolerance for testing rng values against expectation, in rms. */
static constexpr double TOLERANCE{5};
@@ -833,11 +833,11 @@ class ExponentialTestCase : public TestCaseBase
ExponentialTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/** Tolerance for testing rng values against expectation, in rms. */
static constexpr double TOLERANCE{5};
@@ -914,11 +914,11 @@ class ExponentialAntitheticTestCase : public TestCaseBase
ExponentialAntitheticTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/** Tolerance for testing rng values against expectation, in rms. */
static constexpr double TOLERANCE{5};
@@ -998,11 +998,11 @@ class ParetoTestCase : public TestCaseBase
ParetoTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -1091,11 +1091,11 @@ class ParetoAntitheticTestCase : public TestCaseBase
ParetoAntitheticTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -1188,11 +1188,11 @@ class WeibullTestCase : public TestCaseBase
WeibullTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -1297,11 +1297,11 @@ class WeibullAntitheticTestCase : public TestCaseBase
WeibullAntitheticTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -1408,11 +1408,11 @@ class LogNormalTestCase : public TestCaseBase
LogNormalTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -1510,11 +1510,11 @@ class LogNormalAntitheticTestCase : public TestCaseBase
LogNormalAntitheticTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -1614,11 +1614,11 @@ class GammaTestCase : public TestCaseBase
GammaTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -1706,11 +1706,11 @@ class GammaAntitheticTestCase : public TestCaseBase
GammaAntitheticTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -1802,11 +1802,11 @@ class ErlangTestCase : public TestCaseBase
ErlangTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -1897,11 +1897,11 @@ class ErlangAntitheticTestCase : public TestCaseBase
ErlangAntitheticTestCase();
// Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const;
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -1997,7 +1997,7 @@ class ZipfTestCase : public TestCaseBase
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -2077,7 +2077,7 @@ class ZipfAntitheticTestCase : public TestCaseBase
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -2160,7 +2160,7 @@ class ZetaTestCase : public TestCaseBase
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -2223,7 +2223,7 @@ class ZetaAntitheticTestCase : public TestCaseBase
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -2289,7 +2289,7 @@ class DeterministicTestCase : public TestCaseBase
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/** Tolerance for testing rng values against expectation. */
static constexpr double TOLERANCE{1e-8};
@@ -2364,7 +2364,7 @@ class EmpiricalTestCase : public TestCaseBase
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -2464,7 +2464,7 @@ class EmpiricalAntitheticTestCase : public TestCaseBase
private:
// Inherited
virtual void DoRun();
void DoRun() override;
/**
* Tolerance for testing rng values against expectation,
@@ -2543,7 +2543,7 @@ class NormalCachingTestCase : public TestCaseBase
private:
// Inherited
virtual void DoRun();
void DoRun() override;
};
NormalCachingTestCase::NormalCachingTestCase()

View File

@@ -75,7 +75,7 @@ class RngUniformTestCase : public TestCase
static const uint32_t N_MEASUREMENTS = 1000000;
RngUniformTestCase();
virtual ~RngUniformTestCase();
~RngUniformTestCase() override;
/**
* Run a chi-squared test on the results of the random number generator.
@@ -85,7 +85,7 @@ class RngUniformTestCase : public TestCase
double ChiSquaredTest(Ptr<UniformRandomVariable> u);
private:
virtual void DoRun();
void DoRun() override;
};
RngUniformTestCase::RngUniformTestCase()
@@ -168,7 +168,7 @@ class RngNormalTestCase : public TestCase
static const uint32_t N_MEASUREMENTS = 1000000;
RngNormalTestCase();
virtual ~RngNormalTestCase();
~RngNormalTestCase() override;
/**
* Run a chi-squared test on the results of the random number generator.
@@ -178,7 +178,7 @@ class RngNormalTestCase : public TestCase
double ChiSquaredTest(Ptr<NormalRandomVariable> n);
private:
virtual void DoRun();
void DoRun() override;
};
RngNormalTestCase::RngNormalTestCase()
@@ -275,7 +275,7 @@ class RngExponentialTestCase : public TestCase
static const uint32_t N_MEASUREMENTS = 1000000;
RngExponentialTestCase();
virtual ~RngExponentialTestCase();
~RngExponentialTestCase() override;
/**
* Run a chi-squared test on the results of the random number generator.
@@ -285,7 +285,7 @@ class RngExponentialTestCase : public TestCase
double ChiSquaredTest(Ptr<ExponentialRandomVariable> n);
private:
virtual void DoRun();
void DoRun() override;
};
RngExponentialTestCase::RngExponentialTestCase()
@@ -381,7 +381,7 @@ class RngParetoTestCase : public TestCase
static const uint32_t N_MEASUREMENTS = 1000000;
RngParetoTestCase();
virtual ~RngParetoTestCase();
~RngParetoTestCase() override;
/**
* Run a chi-squared test on the results of the random number generator.
@@ -391,7 +391,7 @@ class RngParetoTestCase : public TestCase
double ChiSquaredTest(Ptr<ParetoRandomVariable> p);
private:
virtual void DoRun();
void DoRun() override;
};
RngParetoTestCase::RngParetoTestCase()

View File

@@ -42,7 +42,7 @@ class SqliteDataOutput : public DataOutputInterface
{
public:
SqliteDataOutput();
virtual ~SqliteDataOutput() override;
~SqliteDataOutput() override;
/**
* Register this type.
@@ -50,7 +50,7 @@ class SqliteDataOutput : public DataOutputInterface
*/
static TypeId GetTypeId();
virtual void Output(DataCollector& dc) override;
void Output(DataCollector& dc) override;
private:
/**
@@ -71,7 +71,7 @@ class SqliteDataOutput : public DataOutputInterface
/**
* Destructor
*/
~SqliteOutputCallback();
~SqliteOutputCallback() override;
/**
* \brief Generates data statistics
@@ -81,7 +81,7 @@ class SqliteDataOutput : public DataOutputInterface
*/
void OutputStatistic(std::string key,
std::string variable,
const StatisticalSummary* statSum);
const StatisticalSummary* statSum) override;
/**
* \brief Generates a single data output
@@ -89,7 +89,7 @@ class SqliteDataOutput : public DataOutputInterface
* \param variable the variable name
* \param val the value
*/
void OutputSingleton(std::string key, std::string variable, int val);
void OutputSingleton(std::string key, std::string variable, int val) override;
/**
* \brief Generates a single data output
@@ -97,7 +97,7 @@ class SqliteDataOutput : public DataOutputInterface
* \param variable the variable name
* \param val the value
*/
void OutputSingleton(std::string key, std::string variable, uint32_t val);
void OutputSingleton(std::string key, std::string variable, uint32_t val) override;
/**
* \brief Generates a single data output
@@ -105,7 +105,7 @@ class SqliteDataOutput : public DataOutputInterface
* \param variable the variable name
* \param val the value
*/
void OutputSingleton(std::string key, std::string variable, double val);
void OutputSingleton(std::string key, std::string variable, double val) override;
/**
* \brief Generates a single data output
@@ -113,7 +113,7 @@ class SqliteDataOutput : public DataOutputInterface
* \param variable the variable name
* \param val the value
*/
void OutputSingleton(std::string key, std::string variable, std::string val);
void OutputSingleton(std::string key, std::string variable, std::string val) override;
/**
* \brief Generates a single data output
@@ -121,7 +121,7 @@ class SqliteDataOutput : public DataOutputInterface
* \param variable the variable name
* \param val the value
*/
void OutputSingleton(std::string key, std::string variable, Time val);
void OutputSingleton(std::string key, std::string variable, Time val) override;
private:
Ptr<SQLiteOutput> m_db; //!< Db