dd_enum_param.h
Go to the documentation of this file.
00001 //
00002 // Created by Noam Dori on 20/06/18.
00003 //
00004 
00005 #ifndef DDYNAMIC_RECONFIGURE_DD_ENUM_PARAM_H
00006 #define DDYNAMIC_RECONFIGURE_DD_ENUM_PARAM_H
00007 
00008 #include "dd_int_param.h"
00009 #include <boost/foreach.hpp>
00010 
00011 namespace ddynamic_reconfigure {
00012     typedef map<string,pair<int,string> > EnumMap;
00019     class DDEnum : virtual public DDInt {
00020     public:
00021 
00022         void prepGroup(Group &group);
00023 
00024         bool sameType(Value val);
00025 
00026         bool sameValue(Value val);
00027 
00028         void setValue(Value val);
00029 
00038         DDEnum(const string &name, unsigned int level, const string &description,
00039                 int def, const map<string,int> &dictionary);
00040 
00049         DDEnum(const string &name, unsigned int level, const string &description,
00050                 const string& def, const map<string,int> &dictionary);
00051 
00052         #ifdef __clang__
00053         #pragma clang diagnostic push
00054         #pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
00055         #endif
00056 
00067         DDEnum(const string &name, unsigned int level, const string &description,
00068                int def, const pair<map<string,pair<int,string> >,string> &dictionary);
00069 
00081         DDEnum(const string &name, unsigned int level, const string &description,
00082                const string& def, const pair<map<string,pair<int,string> >,string>  &dictionary);
00083         #ifdef __clang__
00084         #pragma clang diagnostic pop
00085         #endif
00086 
00087     protected:
00092         const EnumMap dict_;
00096         string enum_description_;
00097     private:
00104         int lookup(Value val);
00105 
00110         string makeEditMethod();
00111 
00119         string makeConst(string name, int value, string desc);
00120     };
00121 }
00122 
00123 #endif //DDYNAMIC_RECONFIGURE_DD_ENUM_PARAM_H


ddynamic_reconfigure
Author(s): Noam Dori
autogenerated on Wed May 15 2019 04:39:27