Go to the documentation of this file.
29 #ifndef HECTOR_POSE_ESTIMATION_PARAMETERS_H
30 #define HECTOR_POSE_ESTIMATION_PARAMETERS_H
34 #include <boost/shared_ptr.hpp>
35 #include <boost/function.hpp>
36 #include <boost/type_traits.hpp>
57 virtual bool isAlias()
const {
return false; }
59 template <
typename T>
bool hasType()
const {
63 template <
typename T>
const T&
as()
const {
68 template <
typename T> T&
as() {
73 operator void*()
const {
return reinterpret_cast<void *
>(!
empty()); }
88 typedef typename boost::remove_reference<typename boost::remove_const<T>::type>
::type param_type;
115 using Parameter::operator =;
118 if (
key.empty())
key = other->key;
123 template <
typename T>
126 typedef typename boost::remove_reference<typename boost::remove_const<T>::type>
::type param_type;
138 using Alias::operator =;
143 using std::list<ParameterPtr>::iterator;
144 using std::list<ParameterPtr>::const_iterator;
148 template <
typename T>
ParameterList&
add(
const std::string& key, T& value,
const T& default_value) {
150 return add(key, value);
154 return add(key, *value);
168 template <
typename T> T&
getAs(
const std::string& key)
const {
169 return get(key)->as<T>();
172 using std::list<ParameterPtr>::erase;
173 iterator
erase(
const std::string& key);
185 return result.
add(list1).
add(list2);
194 #endif // HECTOR_POSE_ESTIMATION_PARAMETERS_H
ParameterPtr const & get(const std::string &key) const
const param_type & value() const
ParameterT(Parameter &other)
ParameterList & add(const std::string &key, T *value)
Alias & operator=(const ParameterPtr &other)
virtual bool empty() const
Parameter & operator=(const T &value)
void initialize(ParameterRegisterFunc func) const
static ParameterList operator+(ParameterList const &list1, ParameterList const &list2)
boost::function< void(ParameterPtr)> ParameterRegisterFunc
AliasT(const ParameterPtr &other)
boost::remove_reference< typename boost::remove_const< T >::type >::type param_type
Parameter(Parameter &other)
AliasT(const ParameterPtr &other, const std::string &key)
boost::shared_ptr< Parameter > ParameterPtr
const param_type & value() const
ParameterList & add(const std::string &key, T &value, const T &default_value)
ParameterT(const std::string &key, param_type &value)
const char * type() const
Alias(const ParameterPtr &other, const std::string &key)
virtual const char * type() const
ParameterList & copy(const std::string &prefix, ParameterList const ¶meters)
virtual void operator()(ParameterPtr)
ParameterList & addAlias(const std::string &key, Alias &alias)
void set(const param_type &value)
T & getAs(const std::string &key) const
boost::remove_reference< typename boost::remove_const< T >::type >::type param_type
virtual ParameterPtr clone()
Alias(const ParameterPtr &other)
virtual bool isAlias() const
void set(const param_type &value)
boost::shared_ptr< const Parameter > ParameterConstPtr
virtual bool isAlias() const
iterator erase(const std::string &key)
Parameter(const std::string &key)