parameter_pa_ros.h
Go to the documentation of this file.
1 /******************************************************************************
2 * *
3 * parameter_pa_ros.h *
4 * ================== *
5 * *
6 *******************************************************************************
7 * *
8 * github repository *
9 * https://github.com/TUC-ProAut/ros_parameter *
10 * *
11 * Chair of Automation Technology, Technische Universität Chemnitz *
12 * https://www.tu-chemnitz.de/etit/proaut *
13 * *
14 *******************************************************************************
15 * *
16 * New BSD License *
17 * *
18 * Copyright (c) 2015-2020, Peter Weissig, Technische Universität Chemnitz *
19 * All rights reserved. *
20 * *
21 * Redistribution and use in source and binary forms, with or without *
22 * modification, are permitted provided that the following conditions are met: *
23 * * Redistributions of source code must retain the above copyright *
24 * notice, this list of conditions and the following disclaimer. *
25 * * Redistributions in binary form must reproduce the above copyright *
26 * notice, this list of conditions and the following disclaimer in the *
27 * documentation and/or other materials provided with the distribution. *
28 * * Neither the name of the Technische Universität Chemnitz nor the *
29 * names of its contributors may be used to endorse or promote products *
30 * derived from this software without specific prior written permission. *
31 * *
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" *
33 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE *
34 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE *
35 * ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY *
36 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
37 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR *
38 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *
39 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT *
40 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY *
41 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
42 * DAMAGE. *
43 * *
44 ******************************************************************************/
45 
46 #ifndef __PARAMETER_PA_ROS_H
47 #define __PARAMETER_PA_ROS_H
48 
49 // ros headers
50 #include <ros/ros.h>
51 
52 // standard headers
53 #include <string>
54 #include <vector>
55 
56 #include <eigen3/Eigen/Core>
57 
58 //**************************[cParameterPaRos]**********************************
60  public:
61  bool load(const std::string name, bool &value,
62  const bool print_default = true) const;
63 
64  bool load(const std::string name, std::string &value,
65  const bool print_default = true) const;
66  bool loadTopic(const std::string name, std::string &value,
67  const bool print_default = true) const;
68  bool loadPath(const std::string name, std::string &value,
69  const bool print_default = true) const;
70 
71  bool load(const std::string name, int &value,
72  const bool print_default = true) const;
73 
74  bool load(const std::string name, double &value,
75  const bool print_default = true) const;
76 
77 
78  bool load(const std::string name, std::vector<bool > &value,
79  const bool print_default = true) const;
80 
81  bool load(const std::string name, std::vector<std::string> &value,
82  const bool print_default = true) const;
83 
84  bool load(const std::string name, std::vector<int > &value,
85  const bool print_default = true) const;
86 
87  bool load(const std::string name, std::vector<double > &value,
88  const bool print_default = true) const;
89 
90  bool load(const std::string name, Eigen::MatrixXf &value,
91  const bool print_default = true) const;
92 
93  static bool replaceFindpack(std::string &path);
94  static std::string resolveRessourcename(const std::string name);
95  static std::string boolToStr(const bool value);
96 
97  // deprecated function names, just for compatibility
98  // (starting after next ros-release, those names will
99  // marked as deprecated)
100  // __attribute__ ((deprecated))
101  bool load_topic(const std::string name, std::string &value,
102  const bool print_default = true) const;
103  // __attribute__ ((deprecated))
104  bool load_path(const std::string name, std::string &value,
105  const bool print_default = true) const;
106 
107  //__attribute__ ((deprecated))
108  static bool replace_findpack(std::string &path);
109  //__attribute__ ((deprecated))
110  static void resolve_ressourcename(std::string &name);
111  //__attribute__ ((deprecated))
112  static std::string bool_to_str(const bool value);
113 
114  private:
115  void loadSub(const std::string &n, const std::string &v,
116  const bool p, const bool r) const;
117  static std::list<std::string> splitRessourcename(
118  const std::string name);
119 
121 };
122 
123 #endif // __PARAMETER_PA_ROS_H
bool loadPath(const std::string name, std::string &value, const bool print_default=true) const
bool load_path(const std::string name, std::string &value, const bool print_default=true) const
ros::NodeHandle nh_
bool loadTopic(const std::string name, std::string &value, const bool print_default=true) const
bool load_topic(const std::string name, std::string &value, const bool print_default=true) const
deprecated function names, just for compatibility
bool load(const std::string name, bool &value, const bool print_default=true) const
static bool replaceFindpack(std::string &path)
static std::list< std::string > splitRessourcename(const std::string name)
static void resolve_ressourcename(std::string &name)
static std::string boolToStr(const bool value)
static std::string resolveRessourcename(const std::string name)
void loadSub(const std::string &n, const std::string &v, const bool p, const bool r) const
private functions
static bool replace_findpack(std::string &path)
static std::string bool_to_str(const bool value)


parameter_pa
Author(s):
autogenerated on Thu Jun 11 2020 03:58:49