![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Observer to monitor the lifetime of a shared resource. More...
#include <ResourceManager.hpp>
Public Member Functions | |
| template<typename T > | |
| ResourceObserver (std::shared_ptr< T > const &status) | |
| bool | is_valid () const |
Observer to monitor the lifetime of a shared resource.
A shared resource whose lifetime isn't managed via a smart pointer can become a dangling reference. When a resource is centrally managed, e.g. via a singleton, the singleton interface can be adapted to keep track of the shared resources lifetime via an "observer" object that shares the same lifetime.
This class wraps a type-erased non-owning observer that cannot be promoted to a shared handle.
Definition at line 97 of file ResourceManager.hpp.
|
inline |
Definition at line 99 of file ResourceManager.hpp.
|
inline |
Definition at line 100 of file ResourceManager.hpp.
Referenced by walberla::EKinWalberlaImpl< FluxCount, FloatType, Architecture >::ghost_communication(), walberla::LBWalberlaImpl< FloatType, Architecture >::ghost_communication(), walberla::EKinWalberlaImpl< FluxCount, FloatType, Architecture >::ghost_communication_boundary(), walberla::LBWalberlaImpl< FloatType, Architecture >::ghost_communication_boundary(), walberla::LBWalberlaImpl< FloatType, Architecture >::ghost_communication_full(), walberla::LBWalberlaImpl< FloatType, Architecture >::ghost_communication_laf(), walberla::LBWalberlaImpl< FloatType, Architecture >::ghost_communication_pdf(), walberla::LBWalberlaImpl< FloatType, Architecture >::ghost_communication_vel(), and walberla::EKinWalberlaImpl< FluxCount, FloatType, Architecture >::integrate().