00001 // 00002 // Created by Noam Dori on 19/06/18. 00003 // 00004 00005 #ifndef DDYNAMIC_RECONFIGURE_DD_INT_PARAM_H 00006 #define DDYNAMIC_RECONFIGURE_DD_INT_PARAM_H 00007 00008 #include "ddynamic_reconfigure/dd_param.h" 00009 00010 namespace ddynamic_reconfigure { 00017 class DDInt : virtual public DDParam { 00018 public: 00019 string getName() const; 00020 00021 void prepGroup(Group &group); 00022 00023 void prepConfig(Config &conf); 00024 00025 void prepConfigDescription(ConfigDescription &conf_desc); 00026 00027 int getLevel() const; 00028 00029 bool sameType(Value val); 00030 00031 bool sameValue(Value val); 00032 00033 void setValue(Value val); 00034 00035 Value getValue() const; 00036 00046 inline DDInt(const string &name, unsigned int level, const string &description, 00047 int def, int min = INT32_MIN, int max = INT32_MAX) { 00048 name_ = name; 00049 level_ = level; 00050 desc_ = description; 00051 def_ = def; 00052 val_ = def; 00053 max_ = max; 00054 min_ = min; 00055 } 00056 00057 protected: 00062 unsigned int level_; 00069 int def_,max_,min_,val_; 00074 string name_, desc_; 00075 }; 00076 } 00077 00078 #endif //DDYNAMIC_RECONFIGURE_DD_INT_PARAM_H