Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg > Class Template Reference

#include <ref_counted.h>

Inheritance diagram for grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >:
Inheritance graph
[legend]

Public Types

using RefCountedChildType = Child
 

Public Member Functions

RefCountedoperator= (const RefCounted &)=delete
 
RefCountedPtr< Child > Ref () GRPC_MUST_USE_RESULT
 
RefCountedPtr< Child > Ref (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
 RefCounted (const RefCounted &)=delete
 
RefCountedPtr< Child > RefIfNonZero () GRPC_MUST_USE_RESULT
 
RefCountedPtr< Child > RefIfNonZero (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT
 
void Unref ()
 
void Unref (const DebugLocation &location, const char *reason)
 
 ~RefCounted ()=default
 
- Public Member Functions inherited from grpc_core::PolymorphicRefCount
virtual ~PolymorphicRefCount ()=default
 

Protected Member Functions

 RefCounted (const char *trace=nullptr, intptr_t initial_refcount=1)
 

Private Member Functions

void IncrementRefCount ()
 
void IncrementRefCount (const DebugLocation &location, const char *reason)
 

Private Attributes

RefCount refs_
 

Friends

template<typename T >
class RefCountedPtr
 

Detailed Description

template<typename Child, typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
class grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >

Definition at line 280 of file ref_counted.h.

Member Typedef Documentation

◆ RefCountedChildType

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
using grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >::RefCountedChildType = Child

Definition at line 282 of file ref_counted.h.

Constructor & Destructor Documentation

◆ ~RefCounted()

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >::~RefCounted ( )
default

◆ RefCounted() [1/2]

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >::RefCounted ( const RefCounted< Child, Impl, UnrefBehaviorArg > &  )
delete

◆ RefCounted() [2/2]

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >::RefCounted ( const char *  trace = nullptr,
intptr_t  initial_refcount = 1 
)
inlineexplicitprotected

Definition at line 330 of file ref_counted.h.

Member Function Documentation

◆ IncrementRefCount() [1/2]

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
void grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >::IncrementRefCount ( )
inlineprivate

Definition at line 339 of file ref_counted.h.

◆ IncrementRefCount() [2/2]

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
void grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >::IncrementRefCount ( const DebugLocation location,
const char *  reason 
)
inlineprivate

Definition at line 340 of file ref_counted.h.

◆ operator=()

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
RefCounted& grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >::operator= ( const RefCounted< Child, Impl, UnrefBehaviorArg > &  )
delete

◆ Ref() [1/2]

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
RefCountedPtr<Child> grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >::Ref ( )
inline

Definition at line 287 of file ref_counted.h.

◆ Ref() [2/2]

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
RefCountedPtr<Child> grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >::Ref ( const DebugLocation location,
const char *  reason 
)
inline

Definition at line 292 of file ref_counted.h.

◆ RefIfNonZero() [1/2]

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
RefCountedPtr<Child> grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >::RefIfNonZero ( )
inline

Definition at line 313 of file ref_counted.h.

◆ RefIfNonZero() [2/2]

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
RefCountedPtr<Child> grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >::RefIfNonZero ( const DebugLocation location,
const char *  reason 
)
inline

Definition at line 317 of file ref_counted.h.

◆ Unref() [1/2]

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
void grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >::Unref ( )
inline

Definition at line 302 of file ref_counted.h.

◆ Unref() [2/2]

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
void grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >::Unref ( const DebugLocation location,
const char *  reason 
)
inline

Definition at line 307 of file ref_counted.h.

Friends And Related Function Documentation

◆ RefCountedPtr

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
template<typename T >
friend class RefCountedPtr
friend

Definition at line 337 of file ref_counted.h.

Member Data Documentation

◆ refs_

template<typename Child , typename Impl = PolymorphicRefCount, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
RefCount grpc_core::RefCounted< Child, Impl, UnrefBehaviorArg >::refs_
private

Definition at line 344 of file ref_counted.h.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:37