theCore C++ embedded framework
ecl::aux Class Referenceabstract

Base helper class, used internally by shared_ptr. More...

#include </home/travis/build/forGGe/theCore/lib/cpp/export/ecl/memory.hpp>

Inheritance diagram for ecl::aux:

Public Member Functions

 aux ()
 Constructs auxilary object. More...
 
size_t inc ()
 Incremets reference counter and returns new value. More...
 
size_t dec ()
 Decrements reference counter and returns new value. More...
 
size_t ref ()
 Returns reference counter. More...
 
size_t weak_inc ()
 Incremets weak reference counter and returns new value. More...
 
size_t weak_dec ()
 Decrements weak reference counter and returns new value. More...
 
size_t weak_ref ()
 Returns wek reference counter. More...
 
virtual void destroy ()=0
 Destroys aux and deallocates memory if both shared and weak counter is zero. More...
 

Protected Attributes

size_t m_cnt
 Reference counter. More...
 
size_t m_weak
 Weak reference counter. More...
 

Detailed Description

Base helper class, used internally by shared_ptr.

Constructor & Destructor Documentation

◆ aux()

ecl::aux::aux ( )
inline

Constructs auxilary object.

Member Function Documentation

◆ inc()

size_t ecl::aux::inc ( )
inline

Incremets reference counter and returns new value.

◆ dec()

size_t ecl::aux::dec ( )
inline

Decrements reference counter and returns new value.

◆ ref()

size_t ecl::aux::ref ( )
inline

Returns reference counter.

◆ weak_inc()

size_t ecl::aux::weak_inc ( )
inline

Incremets weak reference counter and returns new value.

◆ weak_dec()

size_t ecl::aux::weak_dec ( )
inline

Decrements weak reference counter and returns new value.

◆ weak_ref()

size_t ecl::aux::weak_ref ( )
inline

Returns wek reference counter.

◆ destroy()

virtual void ecl::aux::destroy ( )
pure virtual

Destroys aux and deallocates memory if both shared and weak counter is zero.

Destructor of the managed object must not be called here. Must be called to destroy whole object.

Implemented in mock_aux.

Field Documentation

◆ m_cnt

size_t ecl::aux::m_cnt
protected

Reference counter.

◆ m_weak

size_t ecl::aux::m_weak
protected

Weak reference counter.


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