Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
grpc_core::RefCount Class Reference

#include <ref_counted.h>

Public Types

using Value = intptr_t
 

Public Member Functions

void Ref (const DebugLocation &location, const char *reason, Value n=1)
 
void Ref (Value n=1)
 
 RefCount (Value init=1, const char *trace=nullptr)
 
bool RefIfNonZero ()
 
bool RefIfNonZero (const DebugLocation &location, const char *reason)
 
void RefNonZero ()
 
void RefNonZero (const DebugLocation &location, const char *reason)
 
bool Unref ()
 
bool Unref (const DebugLocation &location, const char *reason)
 

Private Member Functions

Value get () const
 

Private Attributes

const char * trace_
 
std::atomic< Valuevalue_ {0}
 

Detailed Description

Definition at line 44 of file ref_counted.h.

Member Typedef Documentation

◆ Value

Definition at line 46 of file ref_counted.h.

Constructor & Destructor Documentation

◆ RefCount()

grpc_core::RefCount::RefCount ( Value  init = 1,
const char *  trace = nullptr 
)
inlineexplicit

Definition at line 52 of file ref_counted.h.

Member Function Documentation

◆ get()

Value grpc_core::RefCount::get ( ) const
inlineprivate

Definition at line 193 of file ref_counted.h.

◆ Ref() [1/2]

void grpc_core::RefCount::Ref ( const DebugLocation location,
const char *  reason,
Value  n = 1 
)
inline

Definition at line 79 of file ref_counted.h.

◆ Ref() [2/2]

void grpc_core::RefCount::Ref ( Value  n = 1)
inline

Definition at line 68 of file ref_counted.h.

◆ RefIfNonZero() [1/2]

bool grpc_core::RefCount::RefIfNonZero ( )
inline

Definition at line 125 of file ref_counted.h.

◆ RefIfNonZero() [2/2]

bool grpc_core::RefCount::RefIfNonZero ( const DebugLocation location,
const char *  reason 
)
inline

Definition at line 135 of file ref_counted.h.

◆ RefNonZero() [1/2]

void grpc_core::RefCount::RefNonZero ( )
inline

Definition at line 96 of file ref_counted.h.

◆ RefNonZero() [2/2]

void grpc_core::RefCount::RefNonZero ( const DebugLocation location,
const char *  reason 
)
inline

Definition at line 108 of file ref_counted.h.

◆ Unref() [1/2]

bool grpc_core::RefCount::Unref ( )
inline

Definition at line 152 of file ref_counted.h.

◆ Unref() [2/2]

bool grpc_core::RefCount::Unref ( const DebugLocation location,
const char *  reason 
)
inline

Definition at line 169 of file ref_counted.h.

Member Data Documentation

◆ trace_

const char* grpc_core::RefCount::trace_
private

Definition at line 196 of file ref_counted.h.

◆ value_

std::atomic<Value> grpc_core::RefCount::value_ {0}
private

Definition at line 198 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