diff --git a/Param/Base/IParametricComponent.cpp b/Param/Base/IParametricComponent.cpp index 1b0df2df4dae72ae731d57579172acdb40e1db2c..120f07268e5f6a460e91586493f25f065258d1d8 100644 --- a/Param/Base/IParametricComponent.cpp +++ b/Param/Base/IParametricComponent.cpp @@ -38,18 +38,3 @@ void IParametricComponent::checkLimits(const std::string& name, const double val throw std::runtime_error(message.str()); } } - -std::string IParametricComponent::XComponentName(const std::string& base_name) -{ - return base_name + "X"; -} - -std::string IParametricComponent::YComponentName(const std::string& base_name) -{ - return base_name + "Y"; -} - -std::string IParametricComponent::ZComponentName(const std::string& base_name) -{ - return base_name + "Z"; -} diff --git a/Param/Base/IParametricComponent.h b/Param/Base/IParametricComponent.h index a1be79a761b98b5172dadad2698e1da678cf874b..bead49293dd30a2dc6103f7ad99a07f8ad506351 100644 --- a/Param/Base/IParametricComponent.h +++ b/Param/Base/IParametricComponent.h @@ -53,33 +53,8 @@ protected: //! Name is only for exception message. void checkLimits(const std::string& name, const double value, const RealLimits& limits) const; -private: - static std::string XComponentName(const std::string& base_name); - static std::string YComponentName(const std::string& base_name); - static std::string ZComponentName(const std::string& base_name); - private: std::string m_name; - - // #baPool ++ can this be moved to the testclass (like in INodeTest?) - friend class IParametricComponentTest_InitialState_Test; - friend class IParametricComponentTest_registeredVectors_Test; - friend class IParametricComponentTest_registeredParameters_Test; - friend class DistributionsTest_DistributionGateParameters_Test; - friend class DistributionsTest_DistributionLorentzParameters_Test; - friend class DistributionsTest_DistributionGaussianParameters_Test; - friend class DistributionsTest_DistributionLogNormalParameters_Test; - friend class DistributionsTest_DistributionCosineParameters_Test; - friend class FTDistributionsTest_FTDistribution2DCauchyConstructor_Test; - friend class IParametricComponentTest_fullQualifiedParameters_Test; - friend class IParametricComponentTest_removeParameter_Test; - friend class IParametricComponentTest_matchedParameters_Test; - friend class IParametricComponentTest_SetParameterValue_Test; - friend class Lattice2DTest; - friend class FTDistributionsTest; - friend class TestGUICoreObjectCorrespondence; - friend class LayerRoughnessTest_LayerRoughnessPool_Test; - friend class SampleBuilderNodeTest_builderParameters_Test; }; #endif // BORNAGAIN_PARAM_BASE_IPARAMETRICCOMPONENT_H diff --git a/Param/Node/NodeUtils.cpp b/Param/Node/NodeUtils.cpp index 729ebd963d442ecd30ec26cd9a7babf83cbd2cc4..1ff4a022d559ebd658ca4f9780fce79d4433f772 100644 --- a/Param/Node/NodeUtils.cpp +++ b/Param/Node/NodeUtils.cpp @@ -17,7 +17,6 @@ #include <algorithm> #include <functional> #include <iterator> -#include <sstream> std::vector<std::tuple<const INode*, int, const INode*>> NodeUtils::progenyPlus(const INode* node, int level) @@ -30,21 +29,3 @@ std::vector<std::tuple<const INode*, int, const INode*>> NodeUtils::progenyPlus( } return result; } - -std::string NodeUtils::nodePath(const INode* node, const INode* root) -{ - std::vector<std::string> pathElements; - const INode* current = node; - while (current && current != root) { - pathElements.push_back(current->displayName()); - pathElements.push_back("/"); - current = current->parent(); - } - if (root != nullptr && current != root) - throw std::runtime_error("NodeUtils::nodePath() -> Error. Node doesn't " - "belong to root's branch"); - std::reverse(pathElements.begin(), pathElements.end()); - std::ostringstream result; - std::copy(pathElements.begin(), pathElements.end(), std::ostream_iterator<std::string>(result)); - return result.str(); -} diff --git a/Param/Node/NodeUtils.h b/Param/Node/NodeUtils.h index 64e6bceaab1224d7d195904d761acd3ad6aeb349..320e412064b1dc466ed79184aba3a30a2ecbf290 100644 --- a/Param/Node/NodeUtils.h +++ b/Param/Node/NodeUtils.h @@ -31,9 +31,6 @@ namespace NodeUtils { std::vector<std::tuple<const INode*, int, const INode*>> progenyPlus(const INode* node, int level = 0); -//! Returns path composed of node's displayName, with respect to root node -std::string nodePath(const INode* node, const INode* root = nullptr); - } // namespace NodeUtils #endif // BORNAGAIN_PARAM_NODE_NODEUTILS_H