FastUIDraw
Public Member Functions | Static Public Member Functions | List of all members
fastuidraw::reference_counted_base< T, Counter > Class Template Reference

Base class to use for reference counted objects, for using reference_counted_ptr. See also reference_counted. Object deletion (when the reference count goes to zero) is performed via FASTUIDRAWdelete. As a consequence of using FASTUIDRAWdelete, objects must be created with FASTUIDRAWnew. More...

#include <reference_counted.hpp>

Inheritance diagram for fastuidraw::reference_counted_base< T, Counter >:
Inheritance graph
[legend]

Public Member Functions

 reference_counted_base (void)
 

Static Public Member Functions

static void add_reference (const reference_counted_base< T, Counter > *p)
 
static void remove_reference (const reference_counted_base< T, Counter > *p)
 

Detailed Description

template<typename T, typename Counter>
class fastuidraw::reference_counted_base< T, Counter >

Base class to use for reference counted objects, for using reference_counted_ptr. See also reference_counted. Object deletion (when the reference count goes to zero) is performed via FASTUIDRAWdelete. As a consequence of using FASTUIDRAWdelete, objects must be created with FASTUIDRAWnew.

Template Parameters
Tobject type that is reference counted
Counterobject type to perform reference counting.

The type Counter must expose the methods:

Definition at line 433 of file reference_counted.hpp.

Constructor & Destructor Documentation

◆ reference_counted_base()

template<typename T, typename Counter>
fastuidraw::reference_counted_base< T, Counter >::reference_counted_base ( void  )
inline

Empty ctor.

Definition at line 439 of file reference_counted.hpp.

Member Function Documentation

◆ add_reference()

template<typename T, typename Counter>
static void fastuidraw::reference_counted_base< T, Counter >::add_reference ( const reference_counted_base< T, Counter > *  p)
inlinestatic

Adds a reference count to an object.

Parameters
ppointer to object to which to add reference count.

Definition at line 452 of file reference_counted.hpp.

◆ remove_reference()

template<typename T, typename Counter>
static void fastuidraw::reference_counted_base< T, Counter >::remove_reference ( const reference_counted_base< T, Counter > *  p)
inlinestatic

Removes a reference count to an object, if the reference count is 0, then deletes the object with FASTUIDRAWdelete.

Parameters
ppointer to object from which to remove reference count.

Definition at line 465 of file reference_counted.hpp.


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