30 #ifndef DDYNAMIC_RECONFIGURE_UTILS_H 31 #define DDYNAMIC_RECONFIGURE_UTILS_H 39 return std::numeric_limits<T>::min();
49 inline std::string getMin<std::string>()
57 return std::numeric_limits<T>::max();
73 template <
class T,
class V>
74 bool assignValue(
const std::vector<T> &v,
const std::string &name,
const V &value)
76 for (
unsigned int i = 0; i < v.size(); ++i)
78 if (v[i]->name_ == name)
80 v[i]->updateValue(value);
92 nh.
param<T>(name, param, default_value);
96 std::pair<T, T>
getMinMax(
const std::map<std::string, T> &enum_map)
101 throw std::runtime_error(
"Trying to register an empty enum");
104 min = enum_map.begin()->second;
105 max = enum_map.begin()->second;
107 for (
const auto &it : enum_map)
109 min = std::min(min, it.second);
110 max = std::max(min, it.second);
113 return std::make_pair(min, max);
118 #endif // DDYNAMIC_RECONFIGURE_UTILS_H
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
bool hasParam(const std::string &key) const