Dune-Fufem 2.11-git
Loading...
Searching...
No Matches

Objects of this class are used to uniquely identifies a cache. More...

#include <dune/fufem/forms/shapefunctioncache.hh>

Inheritance diagram for Dune::Fufem::Forms::UniqueCacheId:
Inheritance graph

Public Member Functions

template<class T >
 UniqueCacheId (const T &t)
 
swap (T... args)
 

Public Attributes

first
 
second
 

Detailed Description

Objects of this class are used to uniquely identifies a cache.

The UniqueCacheId is internally a std::pair<void*, std::type_index> which allows to exactly identify objects of any type. E.g. a class can use this to associate a cache to a tree object. Then other classes sharing the same tree but not knowing each other can share an evaluation cache for the tree (e.g. a ShapeFunctionCache<Tree>) by identifying the cache with a pointer to the tree. To avoid that an class and its first member are identified, the UniqueCacheId combines the void* with a std::type_index to also exactly fix the type.

This class is meant to be used with a CacheManager which will store the shared caches, identified via a UniqueCacheId.

Constructor & Destructor Documentation

◆ UniqueCacheId()

template<class T >
Dune::Fufem::Forms::UniqueCacheId::UniqueCacheId ( const T &  t)
inline

The documentation for this class was generated from the following file: