ManaPlus
Public Member Functions | Data Fields
Catch::SharedImpl< T > Struct Template Reference

#include <catch.hpp>

Inheritance diagram for Catch::SharedImpl< T >:
Catch::IShared Catch::NonCopyable

Public Member Functions

 SharedImpl ()
 
virtual void addRef () const
 
virtual void release () const
 
- Public Member Functions inherited from Catch::IShared
virtual ~IShared ()
 

Data Fields

unsigned int m_rc
 

Additional Inherited Members

- Protected Member Functions inherited from Catch::NonCopyable
 NonCopyable ()
 
virtual ~NonCopyable ()
 

Detailed Description

template<typename T = IShared>
struct Catch::SharedImpl< T >

Definition at line 545 of file catch.hpp.

Constructor & Destructor Documentation

◆ SharedImpl()

template<typename T = IShared>
Catch::SharedImpl< T >::SharedImpl ( )
inline

Definition at line 547 of file catch.hpp.

547 : m_rc( 0 ){}
unsigned int m_rc
Definition: catch.hpp:557

Member Function Documentation

◆ addRef()

template<typename T = IShared>
virtual void Catch::SharedImpl< T >::addRef ( ) const
inlinevirtual

Implements Catch::IShared.

Definition at line 549 of file catch.hpp.

549  {
550  ++m_rc;
551  }

◆ release()

template<typename T = IShared>
virtual void Catch::SharedImpl< T >::release ( ) const
inlinevirtual

Implements Catch::IShared.

Definition at line 552 of file catch.hpp.

552  {
553  if( --m_rc == 0 )
554  delete this;
555  }

Field Documentation

◆ m_rc

template<typename T = IShared>
unsigned int Catch::SharedImpl< T >::m_rc
mutable

Definition at line 557 of file catch.hpp.


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