Skip to content
Snippets Groups Projects
Commit 2b7cefa9 authored by Wuttke, Joachim's avatar Wuttke, Joachim Committed by Pospelov, Gennady
Browse files

Corrected virtual / final, thanks to Travis warnings.

# Conflicts:
#	Core/Binning/ConstKBinAxis.h
parent eefe5071
No related branches found
No related tags found
No related merge requests found
...@@ -30,17 +30,18 @@ public: ...@@ -30,17 +30,18 @@ public:
//! @param start low edge of first bin //! @param start low edge of first bin
//! @param end upper edge of last bin //! @param end upper edge of last bin
ConstKBinAxis(const std::string& name, size_t nbins, double start, double end); ConstKBinAxis(const std::string& name, size_t nbins, double start, double end);
virtual ~ConstKBinAxis() {} ~ConstKBinAxis() final {}
ConstKBinAxis* clone() const; ConstKBinAxis* clone() const final {
return new ConstKBinAxis(getName(), m_nbins, m_start, m_end); }
ConstKBinAxis* createClippedAxis(double left, double right) const; ConstKBinAxis* createClippedAxis(double left, double right) const final;
protected: protected:
ConstKBinAxis(const std::string& name, size_t nbins); ConstKBinAxis(const std::string& name, size_t nbins);
void print(std::ostream& ostr) const; void print(std::ostream& ostr) const final;
bool equals(const IAxis& other) const; bool equals(const IAxis& other) const final;
double m_start; double m_start;
double m_end; double m_end;
......
...@@ -51,13 +51,13 @@ public: ...@@ -51,13 +51,13 @@ public:
std::vector<double> getBinCenters() const; std::vector<double> getBinCenters() const;
std::vector<double> getBinBoundaries() const { return m_bin_boundaries; } std::vector<double> getBinBoundaries() const { return m_bin_boundaries; }
VariableBinAxis* createClippedAxis(double left, double right) const; virtual VariableBinAxis* createClippedAxis(double left, double right) const;
protected: protected:
VariableBinAxis(const std::string& name, int nbins = 0); VariableBinAxis(const std::string& name, int nbins = 0);
void setBinBoundaries(const std::vector<double> &bin_boundaries); void setBinBoundaries(const std::vector<double> &bin_boundaries);
void print(std::ostream& ostr) const; virtual void print(std::ostream& ostr) const;
virtual bool equals(const IAxis& other) const; virtual bool equals(const IAxis& other) const;
size_t m_nbins; size_t m_nbins;
......
...@@ -27,18 +27,16 @@ public: ...@@ -27,18 +27,16 @@ public:
#ifndef SWIG #ifndef SWIG
EIGEN_MAKE_ALIGNED_OPERATOR_NEW EIGEN_MAKE_ALIGNED_OPERATOR_NEW
#endif #endif
//! Constructs a material with _name_, _refractive_index_ and //! Constructs a material with _name_, _refractive_index_ and _magnetic_field_
//! _magnetic_field_ HomogeneousMagneticMaterial(const std::string& name, const complex_t refractive_index,
HomogeneousMagneticMaterial(const std::string &name, const complex_t refractive_index,
const kvector_t magnetic_field); const kvector_t magnetic_field);
//! Constructs a material with _name_, refractive_index parameters and //! Constructs a material with _name_, refractive_index parameters and _magnetic_field_
//! _magnetic_field_
HomogeneousMagneticMaterial(const std::string &name, double refractive_index_delta, HomogeneousMagneticMaterial(const std::string &name, double refractive_index_delta,
double refractive_index_beta, const kvector_t magnetic_field); double refractive_index_beta, const kvector_t magnetic_field);
HomogeneousMagneticMaterial* clone() const final override; HomogeneousMagneticMaterial* clone() const final;
HomogeneousMagneticMaterial* cloneInverted() const final override; HomogeneousMagneticMaterial* cloneInverted() const final;
//! Get the magnetic field (in Tesla) //! Get the magnetic field (in Tesla)
kvector_t getMagneticField() const { return m_magnetic_field; } kvector_t getMagneticField() const { return m_magnetic_field; }
...@@ -48,7 +46,7 @@ public: ...@@ -48,7 +46,7 @@ public:
//! Indicates that the material is not scalar. This means that different //! Indicates that the material is not scalar. This means that different
//! polarization states will be diffracted differently //! polarization states will be diffracted differently
virtual bool isScalarMaterial() const { return false; } bool isScalarMaterial() const final { return false; }
#ifndef SWIG #ifndef SWIG
//! Get the scattering matrix (~potential V) from the material. //! Get the scattering matrix (~potential V) from the material.
...@@ -57,11 +55,10 @@ public: ...@@ -57,11 +55,10 @@ public:
#endif #endif
//! Create a new material that is transformed with respect to this one //! Create a new material that is transformed with respect to this one
virtual const IMaterial* createTransformedMaterial( const IMaterial* createTransformedMaterial(const Transform3D& transform) const final;
const Transform3D& transform) const;
protected: protected:
virtual void print(std::ostream &ostr) const { void print(std::ostream &ostr) const final {
ostr << "HomMagMat:" << getName() << "<" << this << ">{ " ostr << "HomMagMat:" << getName() << "<" << this << ">{ "
<< "R=" << m_refractive_index << ", B=" << m_magnetic_field << "}"; } << "R=" << m_refractive_index << ", B=" << m_magnetic_field << "}"; }
......
...@@ -29,19 +29,19 @@ class BA_CORE_API_ ParticleDistribution : public IAbstractParticle ...@@ -29,19 +29,19 @@ class BA_CORE_API_ ParticleDistribution : public IAbstractParticle
public: public:
ParticleDistribution(const IParticle& prototype, const ParameterDistribution& par_distr); ParticleDistribution(const IParticle& prototype, const ParameterDistribution& par_distr);
virtual ParticleDistribution* clone() const; ParticleDistribution* clone() const final;
virtual ParticleDistribution* cloneInvertB() const; ParticleDistribution* cloneInvertB() const final;
void accept(ISampleVisitor* visitor) const override final { visitor->visit(this); } void accept(ISampleVisitor* visitor) const final { visitor->visit(this); }
//! Returns textual representation of *this and its descendants. //! Returns textual representation of *this and its descendants.
virtual std::string to_str(int indent=0) const; std::string to_str(int indent=0) const final;
//! Sets the refractive index of the ambient material. //! Sets the refractive index of the ambient material.
virtual void setAmbientMaterial(const IMaterial& material); void setAmbientMaterial(const IMaterial& material) final;
//! Returns particle's material. //! Returns particle's material.
virtual const IMaterial* getAmbientMaterial() const; const IMaterial* getAmbientMaterial() const final;
//! Returns list of new particles generated according to a distribution. //! Returns list of new particles generated according to a distribution.
std::vector<const IParticle*> generateParticles() const; std::vector<const IParticle*> generateParticles() const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment