 |
ATLAS Offline Software
|
Go to the documentation of this file.
13 #ifndef CXXUTILS_REFCOUNTEDPTR_H
14 #define CXXUTILS_REFCOUNTEDPTR_H
37 template <CxxUtils::detail::RefCounted T>
50 template <CxxUtils::detail::RefCounted OTHER>
51 requires std::convertible_to<OTHER*, T*>
61 template <CxxUtils::detail::RefCounted OTHER>
62 requires std::convertible_to<OTHER*, T*>
66 template <CxxUtils::detail::RefCounted OTHER>
67 requires std::convertible_to<OTHER*, T*>
80 template <CxxUtils::detail::RefCounted OTHER>
81 requires std::convertible_to<OTHER*, T*>
85 template <CxxUtils::detail::RefCounted OTHER>
86 requires std::convertible_to<OTHER*, T*>
99 explicit operator bool()
const;
110 operator const T*()
const;
138 #endif // not CXXUTILS_REFCOUNTEDPTR_H
T & operator*()
Dereference.
T * operator->()
Dereference.
void reset(T *ptr=nullptr)
Change the pointer.
RefCountedPtr(T *p)
Constructor from pointer. Adds to the refcount.
Simple smart pointer for Gaudi-style refcounted objects.
requires std::convertible_to< OTHER *, T * > RefCountedPtr(std::unique_ptr< OTHER > &&other)
Constructor from unique_ptr. Adds to the refcount.
bool operator!() const
Check if the pointer is invalid.
RefCountedPtr(RefCountedPtr &&other)
Move constructor.
const T & operator*() const
bool isValid() const
Check if the pointer is valid.
const T * operator->() const
requires(detail::IsConcurrentHashmapPayload< KEY > &&detail::IsConcurrentHashmapPayload< VALUE > &&detail::IsUpdater< UPDATER > &&detail::IsHash< HASHER, KEY > &&detail::IsBinaryPredicate< MATCHER, KEY >) class ConcurrentMap
Hash map from integers/pointers allowing concurrent, lockless reads.
RefCountedPtr & operator=(const RefCountedPtr &other)
Assignment.
RefCountedPtr(const RefCountedPtr &other)
Copy constructor.
~RefCountedPtr()
Destructor.
A couple standard-library related concepts.
requires std::convertible_to< OTHER *, T * > RefCountedPtr(RefCountedPtr< OTHER > &&other)
Move from another RefCountedPtr, with a different type.
requires std::convertible_to< OTHER *, T * > RefCountedPtr(const RefCountedPtr< OTHER > &other)
Constructor from another RefCountedPtr, with a different type.
T * get()
Get the pointer.
setBGCode setTAP setLVL2ErrorBits bool
RefCountedPtr()=default
Default constructor.