Loading [MathJax]/extensions/TeX/newcommand.js
 deal.II version GIT relicensing-3104-g8c3bc2e695 2025-04-21 18:40:00+00:00
\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}} \newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=} \newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]} \newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
Classes | Typedefs | Functions
observer_pointer.h File Reference
#include <deal.II/base/config.h>
#include <deal.II/base/enable_observer_pointer.h>
#include <deal.II/base/exceptions.h>
#include <atomic>
#include <string>
#include <typeinfo>

Go to the source code of this file.

Classes

class  ObserverPointer< T, P >
 

Typedefs

template<typename T , typename P = void>
using SmartPointer = ObserverPointer< T, P >
 

Functions

template<typename T , typename P , class Q >
void swap (ObserverPointer< T, P > &t1, ObserverPointer< T, Q > &t2)
 
template<typename T , typename P >
void swap (ObserverPointer< T, P > &t1, T *&t2)
 
template<typename T , typename P >
void swap (T *&t1, ObserverPointer< T, P > &t2)
 

Typedef Documentation

◆ SmartPointer

template<typename T , typename P = void>
using SmartPointer = ObserverPointer<T, P>

A type alias for the ObserverPointer class that makes sure the previous name of the class, SmartPointer, continues to be available.

Deprecated:
Use the new name of the class, ObserverPointer, instead.

Definition at line 285 of file observer_pointer.h.

Function Documentation

◆ swap() [1/3]

template<typename T , typename P , class Q >
void swap ( ObserverPointer< T, P > &  t1,
ObserverPointer< T, Q > &  t2 
)
inline

Global function to swap the contents of two smart pointers. As both objects to which the pointers point retain to be subscribed to, we do not have to change their subscription count.

Definition at line 669 of file observer_pointer.h.

◆ swap() [2/3]

template<typename T , typename P >
void swap ( ObserverPointer< T, P > &  t1,
T *&  t2 
)
inline

Global function to swap the contents of a smart pointer and a C-style pointer.

Note that we indeed need a reference of a pointer, as we want to change the pointer variable which we are given.

Definition at line 685 of file observer_pointer.h.

◆ swap() [3/3]

template<typename T , typename P >
void swap ( T *&  t1,
ObserverPointer< T, P > &  t2 
)
inline

Global function to swap the contents of a C-style pointer and a smart pointer.

Note that we indeed need a reference of a pointer, as we want to change the pointer variable which we are given.

Definition at line 701 of file observer_pointer.h.