Skip to content
Snippets Groups Projects
Commit 17ef6f8e authored by Jens Georg's avatar Jens Georg
Browse files

D_xy: make it possible to add a desription

parent 0ce12e94
No related branches found
Tags 00.12.00
No related merge requests found
......@@ -122,6 +122,7 @@ namespace ChimeraTK {
struct XyDescription : public PropertyDescription, public PropertyAttributes {
ChimeraTK::RegisterPath xSource;
ChimeraTK::RegisterPath ySource;
std::string description;
XyDescription(ChimeraTK::RegisterPath const& xSource_ = "", ChimeraTK::RegisterPath const& ySource_ = "",
std::string const& location_ = "", std::string const& name_ = "", bool hasHistory_ = true)
......
......@@ -220,6 +220,9 @@ namespace ChimeraTK {
getDecorator<float>(xProcessVariable, DecoratorType::C_style_conversion),
getDecorator<float>(yProcessVariable, DecoratorType::C_style_conversion), _updater));
if(not xyDescription.description.empty())
boost::dynamic_pointer_cast<DoocsXy>(doocsPV)->description(xyDescription.description);
doocsPV->set_ro_access();
return doocsPV;
......
......@@ -265,6 +265,9 @@ namespace ChimeraTK {
auto xyDescription = std::make_shared<XyDescription>(xAbsoluteSource, yAbsoluteSource, locationName, name, false);
processHistoryAndWritableAttributes(xyDescription, xyXml, locationName);
auto descriptionNode = xyXml->get_first_child("description");
xyDescription->description = getContentString(descriptionNode);
addDescription(xyDescription, {xAbsoluteSource, yAbsoluteSource});
}
......
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