Class slamcore::PropertiesInterface

template<typename PT>
class slamcore::PropertiesInterface

Helper for handling the properties.

Property-getters

Query property value.

param pt

Property to query.

param val

Return value.

param idx

Optional index for array-like properties.

return

Error code.

template<typename T>
inline std::enable_if<std::is_integral<T>::value, T>::type getProperty(PropertyT pt, std::size_t idx = 0) const
template<typename T>
inline std::enable_if<std::is_enum<T>::value, T>::type getProperty(PropertyT pt, std::size_t idx = 0) const
template<typename T>
inline std::enable_if<std::is_floating_point<T>::value, T>::type getProperty(PropertyT pt, std::size_t idx = 0) const
template<typename T>
inline std::enable_if<std::is_same<T, std::string>::value, T>::type getProperty(PropertyT pt, std::size_t idx = 0) const
template<typename T>
inline std::enable_if<std::is_same<T, SensorIDT>::value, T>::type getProperty(PropertyT pt, std::size_t idx = 0) const
template<typename T>
inline std::enable_if<std::is_same<T, Vector>::value, T>::type getProperty(PropertyT pt, std::size_t idx = 0) const
template<typename T>
inline std::enable_if<std::is_same<T, Matrix>::value, T>::type getProperty(PropertyT pt, std::size_t idx = 0) const

Property-setter methods

Set a property.

param pt

Property to set.

param val

Value to set.

param idx

Optional index for array-like properties.

return

Error code.

template<typename T>
inline void setProperty(PropertyT pt, const T &val, std::size_t idx = 0, typename std::enable_if<std::is_integral<T>::value, T>::type* = 0)
template<typename T>
inline void setProperty(PropertyT pt, const T &val, std::size_t idx = 0, typename std::enable_if<std::is_enum<T>::value, T>::type* = 0)
template<typename T>
inline void setProperty(PropertyT pt, const T &val, std::size_t idx = 0, typename std::enable_if<std::is_floating_point<T>::value, T>::type* = 0)
inline void setProperty(PropertyT pt, const std::string &val, std::size_t idx = 0)
inline void setProperty(PropertyT pt, const SensorIDT &val, std::size_t idx = 0)
inline void setProperty(PropertyT pt, const VectorInterface &val, std::size_t idx = 0)
inline void setProperty(PropertyT pt, const MatrixInterface &val, std::size_t idx = 0)

Public Types

using PropertyT = PT

Public Functions

virtual ~PropertiesInterface() = default
virtual bool isPropertySupported(PropertyT pt) const = 0

Check if we support a particular property.

virtual bool isPropertyReadOnly(PropertyT pt, std::size_t idx = 0) const = 0

Check if a particular property is read-only.

Parameters
  • pt – Property to query.

  • idx – Optional index for array-like properties.

Returns

Return value.