DUNE-FEM (unstable)
Singleton list for key/object pairs. More...
#include <dune/fem/storage/singletonlist.hh>
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) |
Detailed Description
class Dune::Fem::SingletonList< Key, Object, Factory >
Singleton list for key/object pairs.
A singleton list guarantees that for any valid key at most one object is created.
- Parameters
-
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.
Member Function Documentation
◆ getObject()
|
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.
References DUNE_THROW, and Dune::Fem::SingletonList< Key, Object, Factory >::singletonList().
Referenced by Dune::Fem::DiscreteFunctionSpaceDefault< FunctionSpaceTraits >::auxiliaryDofs(), and Dune::Fem::DofManagerFactory< DofManagerImp >::instance().
◆ removeObject()
|
inlinestatic |
decrease ref counter for this object, if ref counter is zero, object is deleted
References DUNE_THROW, and Dune::Fem::SingletonList< Key, Object, Factory >::singletonList().
Referenced by Dune::Fem::DofManagerFactory< DofManagerImp >::deleteDofManager().
◆ singletonList()
|
inlinestatic |
list that store pairs of key/object pointers singleton list
list that store pairs of key/object pointers
References Dune::Fem::Singleton< Object >::instance().
Referenced by Dune::Fem::SingletonList< Key, Object, Factory >::getObject(), and Dune::Fem::SingletonList< Key, Object, Factory >::removeObject().
The documentation for this class was generated from the following file:
- dune/fem/storage/singletonlist.hh