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 defaultValue default value
* \param index index of the attribute in the specified Typeid * \param index index of the attribute in the specified Typeid
*/ */
virtual void VisitAttribute(TypeId tid, void VisitAttribute(TypeId tid,
std::string name, std::string name,
std::string defaultValue, std::string defaultValue,
uint32_t index); uint32_t index) override;
/** /**
* \brief Add a node for the new TypeId object * \brief Add a node for the new TypeId object
* \param name TypeId name * \param name TypeId name
*/ */
virtual void StartVisitTypeId(std::string name); void StartVisitTypeId(std::string name) override;
/** /**
* \brief Remove the last gtk tree iterator * \brief Remove the last gtk tree iterator
*/ */
virtual void EndVisitTypeId(); void EndVisitTypeId() override;
/** /**
* \brief Adds a treestore iterator to m_treestore model * \brief Adds a treestore iterator to m_treestore model
* \param node the node to be added * \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] start The minimum value of the lowest bin.
* \param [in] end The maximum value of the last 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] 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. * \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. * This vector has one more entry than the number of bins in the histogram.
*/ */
@@ -168,7 +168,7 @@ class TestCaseBase : public TestCase
} }
// Inherited // Inherited
Ptr<RandomVariableStream> Create() const Ptr<RandomVariableStream> Create() const override
{ {
auto rng = CreateObject<RNG>(); auto rng = CreateObject<RNG>();
rng->SetAttribute("Antithetic", BooleanValue(m_anti)); rng->SetAttribute("Antithetic", BooleanValue(m_anti));
@@ -354,11 +354,11 @@ class UniformTestCase : public TestCaseBase
UniformTestCase(); UniformTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
}; };
UniformTestCase::UniformTestCase() UniformTestCase::UniformTestCase()
@@ -476,11 +476,11 @@ class UniformAntitheticTestCase : public TestCaseBase
UniformAntitheticTestCase(); UniformAntitheticTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
}; };
UniformAntitheticTestCase::UniformAntitheticTestCase() UniformAntitheticTestCase::UniformAntitheticTestCase()
@@ -552,7 +552,7 @@ class ConstantTestCase : public TestCaseBase
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** Tolerance for testing rng values against expectation. */ /** Tolerance for testing rng values against expectation. */
static constexpr double TOLERANCE{1e-8}; static constexpr double TOLERANCE{1e-8};
@@ -603,7 +603,7 @@ class SequentialTestCase : public TestCaseBase
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** Tolerance for testing rng values against expectation. */ /** Tolerance for testing rng values against expectation. */
static constexpr double TOLERANCE{1e-8}; static constexpr double TOLERANCE{1e-8};
@@ -659,11 +659,11 @@ class NormalTestCase : public TestCaseBase
NormalTestCase(); NormalTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** Tolerance for testing rng values against expectation, in rms. */ /** Tolerance for testing rng values against expectation, in rms. */
static constexpr double TOLERANCE{5}; static constexpr double TOLERANCE{5};
@@ -745,11 +745,11 @@ class NormalAntitheticTestCase : public TestCaseBase
NormalAntitheticTestCase(); NormalAntitheticTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** Tolerance for testing rng values against expectation, in rms. */ /** Tolerance for testing rng values against expectation, in rms. */
static constexpr double TOLERANCE{5}; static constexpr double TOLERANCE{5};
@@ -833,11 +833,11 @@ class ExponentialTestCase : public TestCaseBase
ExponentialTestCase(); ExponentialTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** Tolerance for testing rng values against expectation, in rms. */ /** Tolerance for testing rng values against expectation, in rms. */
static constexpr double TOLERANCE{5}; static constexpr double TOLERANCE{5};
@@ -914,11 +914,11 @@ class ExponentialAntitheticTestCase : public TestCaseBase
ExponentialAntitheticTestCase(); ExponentialAntitheticTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** Tolerance for testing rng values against expectation, in rms. */ /** Tolerance for testing rng values against expectation, in rms. */
static constexpr double TOLERANCE{5}; static constexpr double TOLERANCE{5};
@@ -998,11 +998,11 @@ class ParetoTestCase : public TestCaseBase
ParetoTestCase(); ParetoTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -1091,11 +1091,11 @@ class ParetoAntitheticTestCase : public TestCaseBase
ParetoAntitheticTestCase(); ParetoAntitheticTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -1188,11 +1188,11 @@ class WeibullTestCase : public TestCaseBase
WeibullTestCase(); WeibullTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -1297,11 +1297,11 @@ class WeibullAntitheticTestCase : public TestCaseBase
WeibullAntitheticTestCase(); WeibullAntitheticTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -1408,11 +1408,11 @@ class LogNormalTestCase : public TestCaseBase
LogNormalTestCase(); LogNormalTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -1510,11 +1510,11 @@ class LogNormalAntitheticTestCase : public TestCaseBase
LogNormalAntitheticTestCase(); LogNormalAntitheticTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -1614,11 +1614,11 @@ class GammaTestCase : public TestCaseBase
GammaTestCase(); GammaTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -1706,11 +1706,11 @@ class GammaAntitheticTestCase : public TestCaseBase
GammaAntitheticTestCase(); GammaAntitheticTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -1802,11 +1802,11 @@ class ErlangTestCase : public TestCaseBase
ErlangTestCase(); ErlangTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -1897,11 +1897,11 @@ class ErlangAntitheticTestCase : public TestCaseBase
ErlangAntitheticTestCase(); ErlangAntitheticTestCase();
// Inherited // Inherited
double ChiSquaredTest(Ptr<RandomVariableStream> rng) const; double ChiSquaredTest(Ptr<RandomVariableStream> rng) const override;
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -1997,7 +1997,7 @@ class ZipfTestCase : public TestCaseBase
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -2077,7 +2077,7 @@ class ZipfAntitheticTestCase : public TestCaseBase
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -2160,7 +2160,7 @@ class ZetaTestCase : public TestCaseBase
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -2223,7 +2223,7 @@ class ZetaAntitheticTestCase : public TestCaseBase
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -2289,7 +2289,7 @@ class DeterministicTestCase : public TestCaseBase
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** Tolerance for testing rng values against expectation. */ /** Tolerance for testing rng values against expectation. */
static constexpr double TOLERANCE{1e-8}; static constexpr double TOLERANCE{1e-8};
@@ -2364,7 +2364,7 @@ class EmpiricalTestCase : public TestCaseBase
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -2464,7 +2464,7 @@ class EmpiricalAntitheticTestCase : public TestCaseBase
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
/** /**
* Tolerance for testing rng values against expectation, * Tolerance for testing rng values against expectation,
@@ -2543,7 +2543,7 @@ class NormalCachingTestCase : public TestCaseBase
private: private:
// Inherited // Inherited
virtual void DoRun(); void DoRun() override;
}; };
NormalCachingTestCase::NormalCachingTestCase() NormalCachingTestCase::NormalCachingTestCase()

View File

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

View File

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