Agora RTC Objective-C API Reference
Refactor
|
Go to the documentation of this file.
12 #if !(__cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800))
15 #ifndef OPTIONAL_ENUM_CLASS
16 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
17 #define OPTIONAL_ENUM_CLASS enum class
19 #define OPTIONAL_ENUM_CLASS enum
66 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
78 operator bool()
const {
return (
ptr_ != NULL); }
95 if (
ptr_ == p)
return *
this;
104 return *
this = r.
get();
107 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
113 template <
typename U>
114 agora_refptr<T>&
operator=(agora_refptr<U>&& r) {
115 agora_refptr<T>(std::move(r)).swap(*
this);
147 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
149 template <
typename T>
150 struct hash<
agora::agora_refptr<T>> {
152 return reinterpret_cast<size_t>(k.
get());
agora_refptr(const agora_refptr< U > &r)
Definition: AgoraRefPtr.h:62
void swap(agora_refptr< T > &r)
Definition: AgoraRefPtr.h:132
bool operator==(const agora_refptr< T > &r) const
Definition: AgoraRefPtr.h:121
Definition: AgoraRefPtr.h:44
agora_refptr< T > & operator=(const agora_refptr< T > &r)
Definition: AgoraRefPtr.h:103
agora_refptr(T *p)
Definition: AgoraRefPtr.h:48
bool operator<(const agora_refptr< T > &r) const
Definition: AgoraRefPtr.h:124
Definition: AgoraAtomicOps.h:21
T * ptr_
Definition: AgoraRefPtr.h:142
agora_refptr< T > & operator=(T *p)
Definition: AgoraRefPtr.h:94
void reset()
Definition: AgoraRefPtr.h:134
T * operator->() const
Definition: AgoraRefPtr.h:80
virtual void AddRef() const =0
agora_refptr()
Definition: AgoraRefPtr.h:46
T & operator*() const
Definition: AgoraRefPtr.h:81
virtual RefCountReleaseStatus Release() const =0
virtual bool HasOneRef() const =0
agora_refptr(const agora_refptr< T > &r)
Definition: AgoraRefPtr.h:57
#define OPTIONAL_ENUM_CLASS
Definition: AgoraRefPtr.h:19
T * move()
Definition: AgoraRefPtr.h:88
Definition: AgoraRefPtr.h:31
OPTIONAL_ENUM_CLASS RefCountReleaseStatus
Definition: AgoraRefPtr.h:25
agora_refptr(U *p)
Definition: AgoraRefPtr.h:53
void swap(T **pp)
Definition: AgoraRefPtr.h:126
~agora_refptr()
Definition: AgoraRefPtr.h:73
virtual ~RefCountInterface()
Definition: AgoraRefPtr.h:40
T * get() const
Definition: AgoraRefPtr.h:77