Berserk
Public Member Functions | Protected Member Functions | List of all members
RefCnt Class Reference

Reference counted base object. More...

#include <RefCnt.hpp>

Inheritance diagram for RefCnt:
Inheritance graph
[legend]

Public Member Functions

virtual ~RefCnt ()
 
bool IsUnique () const
 
std::int32_t GetRefs () const
 
std::int32_t AddRef () const
 
std::int32_t RelRef () const
 

Protected Member Functions

virtual void Destroy () const
 

Detailed Description

Reference counted base object.

Inherit from this class to have shared-ref logic for your class objects. Use RefPtr to wrap and automate RefCnt objects references counting.

See also
Ref

Constructor & Destructor Documentation

◆ ~RefCnt()

virtual RefCnt::~RefCnt ( )
inlinevirtual

Member Function Documentation

◆ AddRef()

std::int32_t RefCnt::AddRef ( ) const
inline

◆ Destroy()

virtual void RefCnt::Destroy ( ) const
inlineprotectedvirtual

Reimplemented in RHIResource.

◆ GetRefs()

std::int32_t RefCnt::GetRefs ( ) const
inline

◆ IsUnique()

bool RefCnt::IsUnique ( ) const
inline

◆ RelRef()

std::int32_t RefCnt::RelRef ( ) const
inline

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