diff --git a/src/SingleLayerOptics/src/MaterialDescription.cpp b/src/SingleLayerOptics/src/MaterialDescription.cpp index 9782f1fe..b1e293b5 100644 --- a/src/SingleLayerOptics/src/MaterialDescription.cpp +++ b/src/SingleLayerOptics/src/MaterialDescription.cpp @@ -121,6 +121,12 @@ namespace SingleLayerOptics return m_Surface.at(t_Side)->getProperty(t_Property); } + double RMaterialProperties::operator()(FenestrationCommon::Property t_Property, + FenestrationCommon::Side t_Side) const + { + return getProperty(t_Property, t_Side); + } + //////////////////////////////////////////////////////////////////////////////////// //// CMaterial //////////////////////////////////////////////////////////////////////////////////// diff --git a/src/SingleLayerOptics/src/MaterialDescription.hpp b/src/SingleLayerOptics/src/MaterialDescription.hpp index 5e83fd60..a74b3c44 100644 --- a/src/SingleLayerOptics/src/MaterialDescription.hpp +++ b/src/SingleLayerOptics/src/MaterialDescription.hpp @@ -38,8 +38,11 @@ namespace SingleLayerOptics { public: RMaterialProperties(double aTf, double aTb, double aRf, double aRb); - double getProperty(FenestrationCommon::Property t_Property, - FenestrationCommon::Side t_Side) const; + [[nodiscard]] double getProperty(FenestrationCommon::Property t_Property, + FenestrationCommon::Side t_Side) const; + [[nodiscard]] double operator()(FenestrationCommon::Property t_Property, + FenestrationCommon::Side t_Side) const; + private: std::map> m_Surface; diff --git a/src/SingleLayerOptics/src/VenetianCell.cpp b/src/SingleLayerOptics/src/VenetianCell.cpp index 78d82d6b..1102dbc5 100644 --- a/src/SingleLayerOptics/src/VenetianCell.cpp +++ b/src/SingleLayerOptics/src/VenetianCell.cpp @@ -64,13 +64,14 @@ namespace SingleLayerOptics size_t size = m_Material->getBandSize(); for(size_t i = 0; i < size; ++i) { - double Tf = aMat[i].getProperty(Property::T, Side::Front); - double Tb = aMat[i].getProperty(Property::T, Side::Back); - double Rf = aMat[i].getProperty(Property::R, Side::Front); - double Rb = aMat[i].getProperty(Property::R, Side::Back); - - m_EnergiesBand.emplace_back( - LayerProperties{Tf, Rf, Tb, Rb}, venetianForwardGeometry, m_BackwardFlowCellDescription); + double Tf = aMat[i](Property::T, Side::Front); + double Tb = aMat[i](Property::T, Side::Back); + double Rf = aMat[i](Property::R, Side::Front); + double Rb = aMat[i](Property::R, Side::Back); + + m_EnergiesBand.emplace_back(LayerProperties{Tf, Rf, Tb, Rb}, + venetianForwardGeometry, + m_BackwardFlowCellDescription); } } }