4#ifndef CONSTPROPAGATINGUNIQUEPOINTER_H
5#define CONSTPROPAGATINGUNIQUEPOINTER_H
62class ConstPropagatingUniquePointer :
private std::shared_ptr<T>
68 explicit ConstPropagatingUniquePointer()
69 : std::shared_ptr<T>(nullptr)
76 explicit ConstPropagatingUniquePointer(T *pointerToObject)
77 : std::shared_ptr<T>(pointerToObject)
85 ~ConstPropagatingUniquePointer() noexcept = default;
88 ConstPropagatingUniquePointer(const ConstPropagatingUniquePointer &) = delete;
89 ConstPropagatingUniquePointer(ConstPropagatingUniquePointer &&) = delete;
90 ConstPropagatingUniquePointer &operator=(const ConstPropagatingUniquePointer &) = delete;
91 ConstPropagatingUniquePointer &operator=(ConstPropagatingUniquePointer &&) = delete;
96 [[nodiscard]] T *operator->()
99 return std::shared_ptr<T>::operator->();
105 [[nodiscard]]
const T *operator->()
const
108 return std::shared_ptr<T>::operator->();
114 [[nodiscard]] T &operator*()
117 return std::shared_ptr<T>::operator*();
123 [[nodiscard]]
const T &operator*()
const
126 return std::shared_ptr<T>::operator*();
134 void reset(T *newObject =
nullptr)
136 std::shared_ptr<T>::reset(newObject);
143 void swap(ConstPropagatingUniquePointer &other)
145 std::shared_ptr<T>::swap(other);
153 [[nodiscard]] T *get()
156 return std::shared_ptr<T>::get();
This file provides support for C++ symbol import and export.
The namespace of this library.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:38 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.