class
Ref
Intrusive ref-counted pointer; T must derive from RefCounted
- Module
- Arc
- Header
#include "Arc/Core/ArcMemory.h"- Namespace
Arcf- Template
template<typename T>
Constructors
| Signature | Name | Description |
|---|---|---|
Ref() : m_ptr(nullptr) | Ref | |
Ref(T* ptr) : m_ptr(ptr) | Ref | |
Ref(const Ref& other) : m_ptr(other.m_ptr) | Ref | |
Ref(Ref&& other) noexcept : m_ptr(other.m_ptr) | Ref | |
template<typename U> Ref(const Ref<U>& other) : m_ptr(other.Get()) | Ref | |
template<typename U> Ref(Ref<U>&& other) noexcept : m_ptr(other.Get()) | Ref | |
~Ref() | ~Ref |
Public functions
| Returns | Name | Description |
|---|---|---|
Ref& | operator= | |
Ref& | operator= | |
Ref& | operator= | |
T* | operator-> | |
T& | operator* | |
operatorbool | ||
T* | Get | |
void | Reset | |
Ref | Create | |
bool | operator== | |
bool | operator!= | |
bool | operator== | |
bool | operator!= |
Function details
Ref
C++
Ref() : m_ptr(nullptr)Ref
C++
Ref(T* ptr) : m_ptr(ptr)Ref
C++
Ref(const Ref& other) : m_ptr(other.m_ptr)Ref
C++
Ref(Ref&& other) noexcept : m_ptr(other.m_ptr)Ref
C++
template<typename U> Ref(const Ref<U>& other) : m_ptr(other.Get())Ref
C++
template<typename U> Ref(Ref<U>&& other) noexcept : m_ptr(other.Get())~Ref
C++
~Ref()operator=
C++
Ref& operator=(const Ref& other)operator=
C++
Ref& operator=(Ref&& other) noexceptoperator=
C++
Ref& operator=(std::nullptr_t)operator->
C++
T* operator->() constoperator*
C++
T& operator*() constoperatorbool
C++
explicit operator bool() constGet
C++
T* Get() constReset
C++
void Reset()Create
C++
template<typename... Args> static Ref Create(Args&&... args)operator==
C++
bool operator==(const Ref& other) constoperator!=
C++
bool operator!=(const Ref& other) constoperator==
C++
bool operator==(std::nullptr_t) constoperator!=
C++
bool operator!=(std::nullptr_t) constGenerated from Arc/Core/ArcMemory.h via arc.json · Nov 5, 2026Version 1.0.0