Skip to content
Snippets Groups Projects
Commit 02dd1c3b authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Box: reduced ParDefs

parent 9b603265
No related branches found
No related tags found
1 merge request!1009move validation out of constructor; replace ParaMeta based parameter checks
......@@ -29,10 +29,10 @@ const double INF = std::numeric_limits<double>::infinity();
struct ParaMeta {
std::string name;
std::string unit;
std::string tooltip;
double vMin;
double vMax;
double vDefault;
std::string tooltip {""};
double vMin {0};
double vMax {0};
double vDefault {0};
};
//! Base class for tree-like structures containing parameterized objects.
......
......@@ -28,12 +28,12 @@ public:
Box* clone() const override { return new Box(m_length, m_width, m_height); }
std::string className() const final { return "Box"; }
// const auto tooltip = "rectangular cuboid";
std::vector<ParaMeta> parDefs() const final
{
return {{"Length", "nm", "side length in x direction", 0, +INF, 0},
{"Width", "nm", "side length in y direction", 0, +INF, 0},
{"Height", "nm", "side length in z direction", 0, +INF, 0}};
return {{"Length", "nm"},
{"Width", "nm"},
{"Height", "nm"}};
}
double length() const { return m_length; }
......
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