dd_string_param.h
Go to the documentation of this file.
1 //
2 // Created by Noam Dori on 19/06/18.
3 //
4 
5 #ifndef DDYNAMIC_RECONFIGURE_DD_STRING_PARAM_H
6 #define DDYNAMIC_RECONFIGURE_DD_STRING_PARAM_H
7 
9 
10 namespace ddynamic_reconfigure {
16  class DDString : virtual public DDParam {
17  public:
18  string getName() const;
19 
20  void prepGroup(Group &group);
21 
22  void prepConfig(Config &conf);
23 
24  void prepConfigDescription(ConfigDescription &conf_desc);
25 
26  int getLevel() const;
27 
28  bool sameType(Value val);
29 
30  bool sameValue(Value val);
31 
32  void setValue(Value val);
33 
34  Value getValue() const;
35 
43  DDString(const string &name, unsigned int level, const string &description, const string &def) {
44  name_ = name;
45  level_ = level;
46  desc_ = description;
47  def_ = def;
48  val_ = def;
49  }
50  protected:
55  unsigned int level_;
60  string def_,val_;
65  string name_, desc_;
66  };
67 }
68 
69 
70 #endif //DDYNAMIC_RECONFIGURE_DD_STRING_PARAM_H
int getLevel() const
fetches the level of the parameter
Value getValue() const
gets the value of this parameter.
bool sameValue(Value val)
checks whether or not the value stored in the value object, when converted to the type of the interna...
unsigned int level_
the level of the parameter: the degree in which things need to be shut down if this param changes ...
void prepConfig(Config &conf)
updates a config message according to this param's info.
string name_
the name of the parameter (name_), and its description (desc_)
string getName() const
gets the name of the parameter, that is, the ID used in the program when requesting it...
string def_
the default value (def_), and the current value (val_)
The DDParam class is the abstraction of all parameter types, and is the template for creating them...
Definition: dd_param.h:48
void prepConfigDescription(ConfigDescription &conf_desc)
updates a config description message according to this param's info.
bool sameType(Value val)
checks whether or not the raw value stored in the value is compatible with the given parameter...
void prepGroup(Group &group)
updates a group message according to this param's info.
The Value class is used to wrap all basic data-types (bool,int,double,string) in something generic...
Definition: dd_value.h:29
DDString(const string &name, unsigned int level, const string &description, const string &def)
a string implementation of the parameter. This is used to handle strings of characters of variable le...
void setValue(Value val)
sets the value of this parameter as this one.


ddynamic_reconfigure
Author(s): Noam Dori
autogenerated on Thu May 16 2019 02:46:37