Go to the documentation of this file.
   34 #ifndef LVR2_ATTRMAPS_ATTRIBUTEMAP_H_ 
   35 #define LVR2_ATTRMAPS_ATTRIBUTEMAP_H_ 
   37 #include <boost/optional.hpp> 
   74 template<
typename HandleT, 
typename ValueT>
 
   79         "HandleT must inherit from BaseHandle!" 
  102     virtual boost::optional<ValueT> 
insert(HandleT key, 
const ValueT& value) = 0;
 
  110     virtual boost::optional<ValueT> 
erase(HandleT key) = 0;
 
  115     virtual void clear() = 0;
 
  124     virtual boost::optional<ValueT&> 
get(HandleT key) = 0;
 
  133     virtual boost::optional<const ValueT&> 
get(HandleT key) 
const = 0;
 
  186 template<
typename HandleT>
 
  191         "HandleT must inherit from BaseHandle!" 
  203     virtual std::unique_ptr<AttributeMapHandleIterator> 
clone() 
const = 0;
 
  214 template<
typename HandleT>
 
  219         "HandleT must inherit from BaseHandle!" 
  236     std::unique_ptr<AttributeMapHandleIterator<HandleT>> 
m_iter;
 
  241 #include "lvr2/attrmaps/AttributeMap.tcc" 
  
virtual bool containsKey(HandleT key) const =0
Returns true iff the map contains a value associated with the given key.
Interface for attribute maps.
virtual bool operator==(const AttributeMapHandleIterator &other) const =0
HandleT HandleType
The type of the handle used as key in this map.
virtual AttributeMapHandleIterator & operator++()=0
virtual boost::optional< ValueT > insert(HandleT key, const ValueT &value)=0
Inserts the given value at the given key position.
AttributeMapHandleIteratorPtr(std::unique_ptr< AttributeMapHandleIterator< HandleT >> iter)
ValueT ValueType
The type of the value stored in this map.
bool operator==(const AttributeMapHandleIteratorPtr &other) const
Iterator over keys of an attribute map.
HandleT operator*() const
virtual AttributeMapHandleIteratorPtr< HandleT > begin() const =0
Returns an iterator over all keys of this map. The order of iteration is unspecified.
virtual ~AttributeMapHandleIteratorPtr()=default
bool operator!=(const AttributeMapHandleIteratorPtr &other) const
virtual size_t numValues() const =0
Returns the number of values in this map.
virtual ~AttributeMapHandleIterator()=default
virtual bool operator!=(const AttributeMapHandleIterator &other) const =0
virtual std::unique_ptr< AttributeMapHandleIterator > clone() const =0
AttributeMapHandleIteratorPtr(const AttributeMapHandleIteratorPtr &iteratorPtr)
std::unique_ptr< AttributeMapHandleIterator< HandleT > > m_iter
AttributeMapHandleIteratorPtr & operator++()
virtual boost::optional< ValueT > erase(HandleT key)=0
Removes the value associated with the given key.
virtual boost::optional< ValueT & > get(HandleT key)=0
Returns the value associated with the given key or None if there is no associated value.
virtual HandleT operator*() const =0
Returns the current handle.
virtual AttributeMapHandleIteratorPtr< HandleT > end() const =0
Returns an iterator to the end of all keys.
Simple convinience wrapper for unique_ptr<AttributeMapHandleIterator>
virtual void clear()=0
Removes all values from the map.
ValueT & operator[](HandleT key)
Returns the value associated with the given key or panics if there is no associated value.
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:22