![]() |
Dune-Fufem 2.11-git
|
Loading...
Searching...
No Matches
SharedPointerMap< K, V, Compare > Class Template Reference
Simple map for shared pointers. More...
#include <dune/fufem/sharedpointermap.hh>
Inheritance diagram for SharedPointerMap< K, V, Compare >:

Public Types | |
| typedef std::map< K, VSP, Compare > | Base |
Public Member Functions | |
| SharedPointerMap () | |
| const VSP & | getPointer (const K &key) const |
| Get a const shared ptr for given key. | |
| VSP & | getPointer (const K &key) |
| Get a shared ptr for given key. | |
| const V & | get (const K &key) const |
| Get const reference to value for given key. | |
| V & | get (const K &key) |
| Get reference to value for given key. | |
| void | set (const K &key, V *value) |
| Set key to value. | |
| T | at (T... args) |
| T | begin (T... args) |
| T | cbegin (T... args) |
| T | cend (T... args) |
| T | clear (T... args) |
| T | contains (T... args) |
| T | count (T... args) |
| T | crbegin (T... args) |
| T | crend (T... args) |
| T | emplace (T... args) |
| T | emplace_hint (T... args) |
| T | empty (T... args) |
| T | end (T... args) |
| T | equal_range (T... args) |
| T | erase (T... args) |
| T | extract (T... args) |
| T | find (T... args) |
| T | get_allocator (T... args) |
| T | insert (T... args) |
| T | insert_or_assign (T... args) |
| T | key_comp (T... args) |
| T | lower_bound (T... args) |
| T | max_size (T... args) |
| T | merge (T... args) |
| T | operator[] (T... args) |
| T | rbegin (T... args) |
| T | rend (T... args) |
| T | size (T... args) |
| T | swap (T... args) |
| T | try_emplace (T... args) |
| T | upper_bound (T... args) |
| T | value_comp (T... args) |
Public Attributes | |
| K | keys |
| STL member. | |
| T | elements |
| STL member. | |
Detailed Description
template<class K, class V, class Compare = std::less<K>>
class SharedPointerMap< K, V, Compare >
class SharedPointerMap< K, V, Compare >
Simple map for shared pointers.
This class aims to make the usage of maps of shared pointers more convenient. It extends a map<K, shared_ptr<V> >.
- Template Parameters
-
K key type V value typ Compare the comparator (defaults to std::less)
- Deprecated:
- This class is deprecated and will be removed after 2.11.
Member Typedef Documentation
◆ Base
template<class K , class V , class Compare = std::less<K>>
| typedef std::map<K, VSP, Compare> SharedPointerMap< K, V, Compare >::Base |
Constructor & Destructor Documentation
◆ SharedPointerMap()
template<class K , class V , class Compare = std::less<K>>
|
inline |
Member Function Documentation
◆ get() [1/2]
template<class K , class V , class Compare = std::less<K>>
|
inline |
Get reference to value for given key.
This throws an exception if the key was not found.
◆ get() [2/2]
template<class K , class V , class Compare = std::less<K>>
|
inline |
Get const reference to value for given key.
This throws an exception if the key was not found.
◆ getPointer() [1/2]
template<class K , class V , class Compare = std::less<K>>
|
inline |
Get a shared ptr for given key.
This throws an exception if the key was not found.
◆ getPointer() [2/2]
template<class K , class V , class Compare = std::less<K>>
|
inline |
Get a const shared ptr for given key.
This throws an exception if the key was not found.
◆ set()
template<class K , class V , class Compare = std::less<K>>
|
inline |
Set key to value.
This creates a shared pointer for the given raw pointer and takes ownership.
Member Data Documentation
◆ elements
|
inherited |
STL member.
◆ keys
|
inherited |
STL member.
The documentation for this class was generated from the following file:
