Go to the documentation of this file.
   34 #ifndef LVR2_ATTRMAPS_LISTMAP_H_ 
   35 #define LVR2_ATTRMAPS_LISTMAP_H_ 
   64 template<
typename HandleT, 
typename ValueT>
 
   87     ListMap(
const ValueT& defaultValue);
 
   95     ListMap(
size_t countElements, 
const ValueT& defaultValue);
 
  101     boost::optional<ValueT> 
insert(HandleT key, 
const ValueT& value) 
final;
 
  102     boost::optional<ValueT> 
erase(HandleT key) 
final;
 
  104     boost::optional<ValueT&> 
get(HandleT key) final;
 
  105     boost::optional<const ValueT&> 
get(HandleT key) const final;
 
  121     typename vector<pair<HandleT, ValueT>>::const_iterator 
keyIterator(HandleT key) const;
 
  122     typename vector<pair<HandleT, ValueT>>::iterator 
keyIterator(HandleT key);
 
  124     template<typename, typename> friend class 
ListMap;
 
  127 template<typename HandleT, typename ValueT>
 
  131     ListMapIterator(
typename vector<pair<HandleT, ValueT>>::const_iterator iter);
 
  137     std::unique_ptr<AttributeMapHandleIterator<HandleT>> clone() 
const final;
 
  140     typename vector<pair<HandleT, ValueT>>::const_iterator 
m_iter;
 
  145 #include "lvr2/attrmaps/ListMap.tcc" 
  
boost::optional< ValueT & > get(HandleT key) final
Returns the value associated with the given key or None if there is no associated value.
void reserve(size_t newCap)
Allocates space for at least newCap more elements.
AttributeMapHandleIteratorPtr< HandleT > begin() const final
Returns an iterator over all keys of this map. The order of iteration is unspecified.
Interface for attribute maps.
boost::optional< ValueT > erase(HandleT key) final
Removes the value associated with the given key.
A simple implementation of AttributeMap for a small number of values.
boost::optional< ValueT > insert(HandleT key, const ValueT &value) final
Inserts the given value at the given key position.
void clear() final
Removes all values from the map.
Iterator over keys of an attribute map.
size_t numValues() const final
Returns the number of values in this map.
ListMap()
Creates an empty map without default element set.
vector< pair< HandleT, ValueT > > m_list
AttributeMapHandleIteratorPtr< HandleT > end() const final
Returns an iterator to the end of all keys.
bool containsKey(HandleT key) const final
Returns true iff the map contains a value associated with the given key.
boost::optional< ValueT > m_default
vector< pair< HandleT, ValueT > >::const_iterator keyIterator(HandleT key) const
vector< pair< HandleT, ValueT > >::const_iterator m_iter
Simple convinience wrapper for unique_ptr<AttributeMapHandleIterator>
BaseVector< CoordType > operator*(const Eigen::Matrix< Scalar, 4, 4 > &mat, const BaseVector< CoordType > &normal)
Multiplication operator to support transformation with Eigen matrices. Rotates the normal,...
lvr2
Author(s): Thomas Wiemann 
, Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr 
autogenerated on Wed Mar 2 2022 00:37:24