Dev Essential  1.6.3
Loading...
Searching...
No Matches
a_util::result::detail::UncountedObject< Interface, Implementation > Class Template Reference

Default implementation of a non-counting reference counter. More...

#include <reference_counted_object.h>

Inherits a_util::result::detail::ReferenceCountedObjectInterface< Interface >.

Public Member Functions

 UncountedObject ()=default
 Default CTOR.
 
template<typename... Args>
 UncountedObject (Args &&... args)
 
virtual ~UncountedObject ()=default
 Default DTOR, provided to be consistent with rule-of-five.
 
void addReference () const override
 Noop.
 
void removeReference () const override
 Noop.
 
const Interface & getObject () const override
 
Interface & getObject () override
 

Additional Inherited Members

- Protected Member Functions inherited from a_util::result::detail::ReferenceCountedObjectInterface< Interface >
 ~ReferenceCountedObjectInterface ()
 DTOR.
 

Detailed Description

template<typename Interface, typename Implementation>
class a_util::result::detail::UncountedObject< Interface, Implementation >

Default implementation of a non-counting reference counter.

Template Parameters
InterfaceThe interface of the resource to handle
ImplementationThe type implementing the Interface type

Constructor & Destructor Documentation

◆ UncountedObject()

template<typename Interface, typename Implementation>
template<typename... Args>
a_util::result::detail::UncountedObject< Interface, Implementation >::UncountedObject ( Args &&... args)
inline

CTOR constructing the managed resource

Template Parameters
ArgsArgument types of the resource's constructor
Parameters
[in]argsValues to forward to the resource's constructor

Member Function Documentation

◆ addReference()

template<typename Interface, typename Implementation>
void a_util::result::detail::UncountedObject< Interface, Implementation >::addReference ( ) const
inlineoverridevirtual

◆ getObject() [1/2]

template<typename Interface, typename Implementation>
const Interface & a_util::result::detail::UncountedObject< Interface, Implementation >::getObject ( ) const
inlineoverridevirtual

Get a reference to the handled object's interface - provided for const correctness

Returns
Const reference to the handled object

Implements a_util::result::detail::ReferenceCountedObjectInterface< Interface >.

◆ getObject() [2/2]

template<typename Interface, typename Implementation>
Interface & a_util::result::detail::UncountedObject< Interface, Implementation >::getObject ( )
inlineoverridevirtual

Get a reference to the handled object's interface

Returns
Reference to the handled object

Implements a_util::result::detail::ReferenceCountedObjectInterface< Interface >.

◆ removeReference()

template<typename Interface, typename Implementation>
void a_util::result::detail::UncountedObject< Interface, Implementation >::removeReference ( ) const
inlineoverridevirtual

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