|
dune-fem 2.8.0
|
Singleton list for key/object pairs. More...
#include <dune/fem/storage/singletonlist.hh>
Classes | |
| struct | Deleter |
Public Types | |
| typedef Key | KeyType |
| typedef Object | ObjectType |
| typedef Factory | FactoryType |
| typedef std ::pair< ObjectType *, unsigned int * > | ValueType |
| typedef std ::pair< KeyType, ValueType > | ListObjType |
Public Member Functions | |
| SingletonList ()=delete | |
| SingletonList (const ThisType &)=delete | |
Static Public Member Functions | |
| static ListType & | singletonList () |
| template<class... Args> | |
| static auto | getObject (const KeyType &key, Args &&... args) -> std::enable_if_t< std::is_same< decltype(FactoryType::createObject(key, std::forward< Args >(args)...)), ObjectType * >::value, ObjectType & > |
| static void | removeObject (const ObjectType &object) |
| static ValueType | getObjFromList (const KeyType &key) |
Static Protected Member Functions | |
| static void | eraseItem (ListIteratorType &it) |
Singleton list for key/object pairs.
A singleton list guarantees that for any valid key at most one object is created.
| Key | type of keys |
| Object | type of objects |
| Factory | factory class creating objects from keys. The default just passes the key to the object's constructor. |
| typedef Factory Dune::Fem::SingletonList< Key, Object, Factory >::FactoryType |
| typedef Key Dune::Fem::SingletonList< Key, Object, Factory >::KeyType |
| typedef std :: pair< KeyType, ValueType > Dune::Fem::SingletonList< Key, Object, Factory >::ListObjType |
| typedef Object Dune::Fem::SingletonList< Key, Object, Factory >::ObjectType |
| typedef std :: pair< ObjectType * , unsigned int * > Dune::Fem::SingletonList< Key, Object, Factory >::ValueType |
|
delete |
|
delete |
|
inlinestaticprotected |
|
inlinestatic |
return reference to the object for given key. If the object does not exist, then it is created first, otherwise the reference counter is increased.
|
inlinestatic |
|
inlinestatic |
decrease ref counter for this object, if ref counter is zero, object is deleted
|
inlinestatic |
list that store pairs of key/object pointers singleton list
list that store pairs of key/object pointers