dune-fem
2.4.1-rc
|
Singleton list for key/object pairs. More...
#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/storage/singletonlist.hh>
Classes | |
class | SingletonListStorage |
Public Types | |
typedef Key | KeyType |
typedef Object | ObjectType |
typedef Factory | FactoryType |
typedef std::pair< ObjectType *, unsigned int * > | ValueType |
typedef std::pair< KeyType, ValueType > | ListObjType |
Static Public Member Functions | |
static ListType & | singletonList () |
static ObjectType & | getObject (const KeyType &key) |
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 |
|
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.
References Dune::Fem::ThreadManager::singleThreadMode().
|
inlinestatic |
|
inlinestatic |
decrease ref counter for this object, if ref counter is zero, object is deleted
References Dune::Fem::ThreadManager::singleThreadMode().
Referenced by Dune::Fem::ThreadIteratorStorageBase< ThreadIterator< GridPart, pitype > >::~ThreadIteratorStorageBase().
|
inlinestatic |
list that store pairs of key/object pointers singleton list
list that store pairs of key/object pointers
References Dune::Fem::SingletonList< Key, Object, Factory >::SingletonListStorage::singletonList().