Skip to content

Commit 49b1598

Browse files
committed
Remove DTOR and operator<< from derived classes
These are not overridden and thus are just boilerplate cluttering the header files of the derived classes.
1 parent f2ae451 commit 49b1598

13 files changed

+0
-59
lines changed

src/bi_operators/Collocation.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class Collocation __final : public IBoundaryIntegralOperator {
6161
public:
6262
Collocation();
6363
Collocation(double fac);
64-
virtual ~Collocation() {}
6564

6665
private:
6766
/*! Scaling factor for the diagonal elements of the matrix representation of

src/bi_operators/Purisima.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ class Purisima __final : public IBoundaryIntegralOperator {
5858
public:
5959
Purisima();
6060
Purisima(double fac);
61-
virtual ~Purisima() {}
6261

6362
private:
6463
/*! Scaling factor for the diagonal elements of the matrix representation of

src/cavity/GePolCavity.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ class GePolCavity __final : public ICavity {
6565
double pr,
6666
double minR,
6767
const std::string & suffix = "");
68-
virtual ~GePolCavity() {}
69-
friend std::ostream & operator<<(std::ostream & os, GePolCavity & cavity) {
70-
return cavity.printCavity(os);
71-
}
7268

7369
private:
7470
double averageArea;

src/cavity/RestartCavity.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ namespace cavity {
4646
class RestartCavity __final : public ICavity {
4747
public:
4848
RestartCavity(const std::string & _fname) : file(_fname) { makeCavity(); }
49-
virtual ~RestartCavity() {}
5049
virtual void makeCavity() __override { loadCavity(file); }
51-
friend std::ostream & operator<<(std::ostream & os, RestartCavity & cavity) {
52-
return cavity.printCavity(os);
53-
}
5450

5551
private:
5652
std::string file;

src/green/AnisotropicLiquid.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,10 @@ class AnisotropicLiquid __final
5959
*/
6060
AnisotropicLiquid(const Eigen::Vector3d & eigen_eps,
6161
const Eigen::Vector3d & euler_ang);
62-
virtual ~AnisotropicLiquid() {}
63-
6462
virtual double permittivity() const __override __final {
6563
PCMSOLVER_ERROR("permittivity() only implemented for uniform dielectrics");
6664
}
6765

68-
friend std::ostream & operator<<(std::ostream & os, AnisotropicLiquid & gf) {
69-
return gf.printObject(os);
70-
}
71-
7266
private:
7367
virtual DerivativeTraits operator()(DerivativeTraits * sp,
7468
DerivativeTraits * pp) const __override;

src/green/GreensFunction.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ template <typename DerivativeTraits, typename ProfilePolicy>
5050
class GreensFunction : public IGreensFunction {
5151
public:
5252
GreensFunction(const ProfilePolicy & p) : delta_(1.0e-04), profile_(p) {}
53-
virtual ~GreensFunction() {}
5453
/*! @{ Methods to sample the Green's function directional derivatives */
5554
/*! Returns value of the directional derivative of the
5655
* Greens's function for the pair of points p1, p2:
@@ -138,10 +137,6 @@ class GreensFunction : public IGreensFunction {
138137
return pcm::is_same<ProfilePolicy, dielectric_profile::Uniform>::value;
139138
}
140139

141-
friend std::ostream & operator<<(std::ostream & os, GreensFunction & gf) {
142-
return gf.printObject(os);
143-
}
144-
145140
protected:
146141
/*! Evaluates the Green's function given a pair of points
147142
* \param[in] source the source point
@@ -185,7 +180,6 @@ template <typename ProfilePolicy>
185180
class GreensFunction<Stencil, ProfilePolicy> : public IGreensFunction {
186181
public:
187182
GreensFunction(const ProfilePolicy & p) : delta_(1.0e-04), profile_(p) {}
188-
virtual ~GreensFunction() {}
189183
/*! @{ Methods to sample the Green's function directional derivatives */
190184
/*! Returns value of the directional derivative of the
191185
* Greens's function for the pair of points p1, p2:
@@ -272,10 +266,6 @@ class GreensFunction<Stencil, ProfilePolicy> : public IGreensFunction {
272266
return pcm::is_same<ProfilePolicy, dielectric_profile::Uniform>::value;
273267
}
274268

275-
friend std::ostream & operator<<(std::ostream & os, GreensFunction & gf) {
276-
return gf.printObject(os);
277-
}
278-
279269
protected:
280270
/*! Evaluates the Green's function given a pair of points
281271
* \param[in] source the source point

src/green/IonicLiquid.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,11 @@ class IonicLiquid __final
5555
: public GreensFunction<DerivativeTraits, dielectric_profile::Yukawa> {
5656
public:
5757
IonicLiquid(double eps, double k);
58-
virtual ~IonicLiquid() {}
5958

6059
virtual double permittivity() const __override __final {
6160
PCMSOLVER_ERROR("permittivity() only implemented for uniform dielectrics");
6261
}
6362

64-
friend std::ostream & operator<<(std::ostream & os, IonicLiquid & gf) {
65-
return gf.printObject(os);
66-
}
67-
6863
private:
6964
virtual DerivativeTraits operator()(DerivativeTraits * sp,
7065
DerivativeTraits * pp) const __override;

src/green/SphericalDiffuse.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,10 @@ class SphericalDiffuse __final : public GreensFunction<Stencil, ProfilePolicy> {
8484
initSphericalDiffuse();
8585
}
8686

87-
virtual ~SphericalDiffuse() {}
88-
8987
virtual double permittivity() const __override __final {
9088
PCMSOLVER_ERROR("permittivity() only implemented for uniform dielectrics");
9189
}
9290

93-
friend std::ostream & operator<<(std::ostream & os, SphericalDiffuse & gf) {
94-
return gf.printObject(os);
95-
}
96-
9791
/*! \brief Returns Coulomb singularity separation coefficient
9892
* \param[in] source location of the source charge
9993
* \param[in] probe location of the probe charge

src/green/SphericalSharp.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ class SphericalSharp __final
6767
* \param[in] l maximum value of angular momentum
6868
*/
6969
SphericalSharp(double e, double esolv, double r, const Eigen::Vector3d & o, int l);
70-
virtual ~SphericalSharp() {}
7170

7271
virtual double permittivity() const __override __final {
7372
PCMSOLVER_ERROR("permittivity() only implemented for uniform dielectrics");
@@ -96,9 +95,6 @@ class SphericalSharp __final
9695
const Eigen::Vector3d & p1,
9796
const Eigen::Vector3d & p2) const;
9897

99-
friend std::ostream & operator<<(std::ostream & os, SphericalSharp & gf) {
100-
return gf.printObject(os);
101-
}
10298
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
10399

104100
private:

src/green/UniformDielectric.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,11 @@ class UniformDielectric __final
5454
: public GreensFunction<DerivativeTraits, dielectric_profile::Uniform> {
5555
public:
5656
UniformDielectric(double eps);
57-
virtual ~UniformDielectric() {}
5857

5958
virtual double permittivity() const __override __final {
6059
return this->profile_.epsilon;
6160
}
6261

63-
friend std::ostream & operator<<(std::ostream & os, UniformDielectric & gf) {
64-
return gf.printObject(os);
65-
}
66-
6762
private:
6863
virtual DerivativeTraits operator()(DerivativeTraits * sp,
6964
DerivativeTraits * pp) const __override;

0 commit comments

Comments
 (0)