Go to the documentation of this file.00001
00020 #pragma once
00021
00022 #include <ros/ros.h>
00023 #include <string>
00024 #include <sstream>
00025 #include <vector>
00026
00027 namespace robot_model_services {
00028
00032 class DebugHelper {
00033
00034 public:
00035
00036 enum DebugLevel {
00037 PARAMETERS = 1,
00038 RATING = 2,
00039 ROBOT_MODEL = 4,
00040 MAP = 8,
00041 IK_RATING = 16
00042 };
00043
00044 private:
00045
00046 static boost::shared_ptr<DebugHelper> instancePtr;
00047 static const int ALL = PARAMETERS
00048 + RATING + ROBOT_MODEL + MAP + IK_RATING;
00049 static const int NONE = 0;
00050
00051 ros::NodeHandle mNodeHandle;
00052 unsigned int mLevels;
00053
00054 public:
00055
00056 static boost::shared_ptr<DebugHelper> getInstance();
00057
00063 void write(const char * text, DebugLevel level);
00064
00070 void write(const std::string &text, DebugLevel level);
00071
00077 void write(const std::ostream &text, DebugLevel level);
00078
00084 void writeNoticeably(const char * text, DebugLevel level);
00085
00091 void writeNoticeably(const std::string &text, DebugLevel level);
00092
00098 void writeNoticeably(const std::ostream &text, DebugLevel level);
00099
00104 unsigned int getLevel();
00105
00110 std::string getLevelString();
00111
00112
00117 void setLevels(std::string levelsStr);
00118
00122 void setLevels();
00123
00124 private:
00125
00126 DebugHelper();
00127
00133 static int parseLevels(std::vector<std::string> levels);
00134
00140 static void addToString(std::string& s, const std::string& add);
00141
00148 bool checkLevel(DebugLevel level);
00149
00150 };
00151
00152 typedef boost::shared_ptr<DebugHelper> DebugHelperPtr;
00153 }
asr_robot_model_services
Author(s): Aumann Florian, Borella Jocelyn, Heller Florian, Meißner Pascal, Schleicher Ralf, Stöckle Patrick, Stroh Daniel, Trautmann Jeremias, Walter Milena, Wittenbeck Valerij
autogenerated on Sat Jun 8 2019 18:24:52