ADTF
Loading...
Searching...
No Matches
adtf::ucom::ant::iobject_ptr_base< T > Class Template Referenceabstract

Base class for iobject_ptr<T> defining their commonly used interface methods. More...

#include <object_ptr_intf.h>

Inherited by adtf::ucom::ant::iobject_ptr< ifunction< Signature > >, adtf::ucom::ant::iobject_ptr< INTERFACE_TYPE >, adtf::ucom::ant::iobject_ptr< const T >, and adtf::ucom::ant::iobject_ptr< T >.

Public Types

typedef T element_type
 Contained type to manage an object of.
 

Public Member Functions

virtual T * Get () const =0
 Get raw pointer to shared object.
 
virtual tResult Reset (const iobject_ptr< T > &i_oOther)=0
 Reset this object_ptr<> with the content of another iobject_ptr<>
 
virtual T * operator-> () const =0
 Operator-> overload to treat object_ptr<> types like real pointers.
 
virtual detail::iobject_ptr_ref< size_t > * GetObjPtrRef () const =0
 
T & operator* () const noexcept
 Operator* to dereference the stored pointer.
 

Protected Member Functions

 ~iobject_ptr_base ()=default
 Destructor.
 

Detailed Description

template<typename T>
class adtf::ucom::ant::iobject_ptr_base< T >

Base class for iobject_ptr<T> defining their commonly used interface methods.

Template Parameters
TType of the managed resource. Must be derived from IObject

Member Function Documentation

◆ Get()

◆ operator*()

template<typename T>
T & adtf::ucom::ant::iobject_ptr_base< T >::operator* ( ) const
inlinenoexcept

Operator* to dereference the stored pointer.

Returns
Reference to the shared object

◆ operator->()

◆ Reset()

template<typename T>
virtual tResult adtf::ucom::ant::iobject_ptr_base< T >::Reset ( const iobject_ptr< T > & i_oOther)
pure virtual

Reset this object_ptr<> with the content of another iobject_ptr<>

Parameters
[in]i_oOtherContains the shared object to reset this type with
Postcondition
Reference counter increased by one. If another object is already managed, the reference count for this object gets decreased by one.
Returns
Standard error code.
Return values
ERR_NOERROREverything went fine
ERR_NO_INTERFACEManaged resource owned by i_oOther does not expose interface type T. *this is reset to nullptr

Implemented in adtf::ucom::ant::detail::object_ptr_delegate_base< T, StorageType >, and adtf::ucom::ant::detail::object_ptr_delegate_base< const IObject, StorageType >.


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