Agora C++ API Reference for All Platforms
|
10 #include "AgoraRefPtr.h"
11 #include "AgoraAtomicOps.h"
13 #ifndef OPTIONAL_REFCOUNTRELEASESTATUS_SPECIFIER
14 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
15 #define OPTIONAL_REFCOUNTRELEASESTATUS_SPECIFIER agora::RefCountReleaseStatus::
17 #define OPTIONAL_REFCOUNTRELEASESTATUS_SPECIFIER
24 explicit RefCounter(
int ref_count) : ref_count_(ref_count) {}
34 ? OPTIONAL_REFCOUNTRELEASESTATUS_SPECIFIER kDroppedLastRef
35 : OPTIONAL_REFCOUNTRELEASESTATUS_SPECIFIER kOtherRefsRemained);
52 volatile int ref_count_;
68 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
74 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
75 template <
class P0,
class P1,
class... Args>
77 : T(
std::forward<P0>(p0),
79 std::forward<Args>(args)...),
87 if (status == OPTIONAL_REFCOUNTRELEASESTATUS_SPECIFIER kDroppedLastRef) {
114 #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
115 template <
typename T,
typename... types>
120 template <
typename T>
124 template <
typename T,
typename P0>
virtual agora::RefCountReleaseStatus Release() const
Definition: AgoraRefCountedObject.h:85
static int AcquireLoad(volatile const int *i)
Definition: AgoraAtomicOps.h:33
RefCountedObject(P0 &&p0, P1 &&p1, Args &&... args)
Definition: AgoraRefCountedObject.h:76
Definition: AgoraRefPtr.h:44
static int Decrement(volatile int *i)
Definition: AgoraAtomicOps.h:30
virtual bool HasOneRef() const
Definition: AgoraRefCountedObject.h:101
agora::RefCounter ref_count_
Definition: AgoraRefCountedObject.h:111
RefCountedObject()
Definition: AgoraRefCountedObject.h:65
virtual void AddRef() const
Definition: AgoraRefCountedObject.h:83
Definition: AgoraRefCountedObject.h:63
Definition: AgoraAtomicOps.h:21
static int Increment(volatile int *i)
Definition: AgoraAtomicOps.h:27
RefCountedObject(const P0 &p0)
Definition: AgoraRefCountedObject.h:71
RefCountedObject(P0 &&p0)
Definition: AgoraRefCountedObject.h:69
agora_refptr< T > make_refptr(types &&... args)
Definition: AgoraRefCountedObject.h:116
void IncRef()
Definition: AgoraRefCountedObject.h:26
bool HasOneRef() const
Definition: AgoraRefCountedObject.h:46
Definition: AgoraOptional.h:881
virtual ~RefCountedObject()
Definition: AgoraRefCountedObject.h:104
Definition: AgoraRefCountedObject.h:22
OPTIONAL_ENUM_CLASS RefCountReleaseStatus
Definition: AgoraRefPtr.h:25
agora::RefCountReleaseStatus DecRef()
Definition: AgoraRefCountedObject.h:32
RefCounter(int ref_count)
Definition: AgoraRefCountedObject.h:24