Skip to content
Snippets Groups Projects
Commit 6e486fb0 authored by Fabian Paus's avatar Fabian Paus
Browse files

RemoteGui: Use much simpler extension interface (overload instead of template specialization)

parent 16c8ec38
No related branches found
No related tags found
No related merge requests found
......@@ -155,12 +155,9 @@ namespace armarx::RemoteGui
.addChild(new RemoteGui::HSpacer)
);
}
}
namespace armarx::RemoteGui::detail::_getValue
{
void GetValueOutputParameter <CartesianWaypointControllerConfig, void>::call(
CartesianWaypointControllerConfig& cfg,
RemoteGui::ValueMap const& values, std::string const& name)
void getValue(CartesianWaypointControllerConfig& cfg,
RemoteGui::ValueMap const& values, std::string const& name)
{
cfg.maxPositionAcceleration = getValue<float>(values, name + "_maxAcc_Pos");
cfg.maxOrientationAcceleration = getValue<float>(values, name + "_maxAcc_Ori");
......
......@@ -31,15 +31,7 @@ namespace armarx::RemoteGui
detail::GroupBoxBuilder makeConfigGui(
const std::string& name,
const CartesianWaypointControllerConfig& val);
}
namespace armarx::RemoteGui::detail::_getValue
{
template<>
struct GetValueOutputParameter <CartesianWaypointControllerConfig, void> : std::true_type
{
static void call(
CartesianWaypointControllerConfig& cfg,
RemoteGui::ValueMap const& values, std::string const& name);
};
void getValue(CartesianWaypointControllerConfig& cfg,
RemoteGui::ValueMap const& values, std::string const& name);
}
......@@ -49,12 +49,9 @@ namespace armarx::RemoteGui
return builder;
}
}
namespace armarx::RemoteGui::detail::_getValue
{
void GetValueOutputParameter <NJointCartesianWaypointControllerRuntimeConfig, void>::call(
NJointCartesianWaypointControllerRuntimeConfig& cfg,
RemoteGui::ValueMap const& values, std::string const& name)
void getValue(NJointCartesianWaypointControllerRuntimeConfig& cfg,
RemoteGui::ValueMap const& values, std::string const& name)
{
getValue(cfg.wpCfg, values, name);
getValue(cfg.forceThreshold, values, name + "_forceThreshold");
......
......@@ -36,15 +36,7 @@ namespace armarx::RemoteGui
NJointCartesianWaypointControllerRuntimeConfig getValue<NJointCartesianWaypointControllerRuntimeConfig>(
ValueMap const& values,
std::string const& name);
}
namespace armarx::RemoteGui::detail::_getValue
{
template<>
struct GetValueOutputParameter <NJointCartesianWaypointControllerRuntimeConfig, void> : std::true_type
{
static void call(
NJointCartesianWaypointControllerRuntimeConfig& cfg,
RemoteGui::ValueMap const& values, std::string const& name);
};
void getValue(NJointCartesianWaypointControllerRuntimeConfig& cfg,
RemoteGui::ValueMap const& values, std::string const& name);
}
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