Skip to content
Snippets Groups Projects
Commit 94ad6b47 authored by Matthias Puchner's avatar Matthias Puchner
Browse files

remove obsolete code

parent 61fccfb2
No related branches found
No related tags found
1 merge request!65Refactor Distribution Handling
...@@ -38,18 +38,3 @@ void IParametricComponent::checkLimits(const std::string& name, const double val ...@@ -38,18 +38,3 @@ void IParametricComponent::checkLimits(const std::string& name, const double val
throw std::runtime_error(message.str()); 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";
}
...@@ -53,33 +53,8 @@ protected: ...@@ -53,33 +53,8 @@ protected:
//! Name is only for exception message. //! Name is only for exception message.
void checkLimits(const std::string& name, const double value, const RealLimits& limits) const; 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: private:
std::string m_name; 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 #endif // BORNAGAIN_PARAM_BASE_IPARAMETRICCOMPONENT_H
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <algorithm> #include <algorithm>
#include <functional> #include <functional>
#include <iterator> #include <iterator>
#include <sstream>
std::vector<std::tuple<const INode*, int, const INode*>> NodeUtils::progenyPlus(const INode* node, std::vector<std::tuple<const INode*, int, const INode*>> NodeUtils::progenyPlus(const INode* node,
int level) int level)
...@@ -30,21 +29,3 @@ std::vector<std::tuple<const INode*, int, const INode*>> NodeUtils::progenyPlus( ...@@ -30,21 +29,3 @@ std::vector<std::tuple<const INode*, int, const INode*>> NodeUtils::progenyPlus(
} }
return result; 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();
}
...@@ -31,9 +31,6 @@ namespace NodeUtils { ...@@ -31,9 +31,6 @@ namespace NodeUtils {
std::vector<std::tuple<const INode*, int, const INode*>> progenyPlus(const INode* node, std::vector<std::tuple<const INode*, int, const INode*>> progenyPlus(const INode* node,
int level = 0); 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 } // namespace NodeUtils
#endif // BORNAGAIN_PARAM_NODE_NODEUTILS_H #endif // BORNAGAIN_PARAM_NODE_NODEUTILS_H
......
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