ADTF
Loading...
Searching...
No Matches
adtf::ucom::ant::detail::object_ptr_delegate_base< T, StorageType > Class Template Reference

Inherits adtf::ucom::ant::iobject_ptr< T >.

Inherited by adtf::ucom::ant::detail::object_ptr_const_delegate< T, StorageType >, and adtf::ucom::ant::detail::object_ptr_delegate< T, StorageType >.

Public Member Functions

template<typename... Args>
 object_ptr_delegate_base (Args &&... args) noexcept
 
 object_ptr_delegate_base (const object_ptr_delegate_base &oOther) noexcept
 
 object_ptr_delegate_base (object_ptr_delegate_base &&oOther) noexcept
 
constexpr detail::iobject_ptr_ref< size_t > * GetObjPtrRef () const noexcept final override
 
constexpr StorageType * GetStorageObject () const noexcept
 
T * Get () const final override
 Get raw pointer to shared object.
 
T * operator-> () const noexcept final override
 Operator-> overload to treat object_ptr<> types like real pointers.
 
T & operator* () const noexcept
 
void Swap (object_ptr_delegate_base &oOther) noexcept
 
void Reset ()
 
tResult Reset (const iobject_ptr< T > &oOther) noexcept final override
 Reset this object_ptr<> with the content of another iobject_ptr<>
 
object_ptr_delegate_baseoperator= (const object_ptr_delegate_base &oOther)
 
object_ptr_delegate_baseoperator= (object_ptr_delegate_base &&oOther)
 
constexpr operator bool () const noexcept
 
- Public Member Functions inherited from adtf::ucom::ant::iobject_ptr< T >
virtual operator const iobject_ptr< const T > & () const =0
 Enable implicit conversion to const value type for pointer-like behavior.
 
- Public Member Functions inherited from adtf::ucom::ant::iobject_ptr_base< T >
T & operator* () const noexcept
 Operator* to dereference the stored pointer.
 

Protected Attributes

::std::conditional_t<::std::is_same_v< std::remove_const_t< T >, IObject >, std::conditional_t<!::std::is_const_v< T > &&!::std::is_const_v< StorageType >, object_ptr_const_iobject_delegate< StorageType >, object_ptr_storage< StorageType > >, std::conditional_t<::std::is_const_v< T >||::std::is_const_v< StorageType >, ::std::conditional_t<::std::is_const_v< StorageType >, object_ptr_const_iobject_delegate< StorageType >, object_ptr_iobject_delegate< StorageType > >, object_ptr_const_delegate< const T, StorageType > > > m_oDelegate
 

Additional Inherited Members

- Public Types inherited from adtf::ucom::ant::iobject_ptr< T >
typedef IObject object_type
 Provided for single point of const correct type access.
 
- Public Types inherited from adtf::ucom::ant::iobject_ptr_base< T >
typedef T element_type
 Contained type to manage an object of.
 
- Protected Member Functions inherited from adtf::ucom::ant::iobject_ptr< T >
 ~iobject_ptr ()=default
 Destructor.
 
- Protected Member Functions inherited from adtf::ucom::ant::iobject_ptr_base< T >
 ~iobject_ptr_base ()=default
 Destructor.
 

Member Function Documentation

◆ Get()

template<typename T, typename StorageType>
T * adtf::ucom::ant::detail::object_ptr_delegate_base< T, StorageType >::Get ( ) const
inlinefinaloverridevirtual

Get raw pointer to shared object.

Returns
Raw pointer to shared object

Implements adtf::ucom::ant::iobject_ptr_base< T >.

◆ GetObjPtrRef()

template<typename T, typename StorageType>
detail::iobject_ptr_ref< size_t > * adtf::ucom::ant::detail::object_ptr_delegate_base< T, StorageType >::GetObjPtrRef ( ) const
inlineconstexprfinaloverridevirtualnoexcept

◆ operator->()

template<typename T, typename StorageType>
T * adtf::ucom::ant::detail::object_ptr_delegate_base< T, StorageType >::operator-> ( ) const
inlinefinaloverridevirtualnoexcept

Operator-> overload to treat object_ptr<> types like real pointers.

Returns
Pointer to shared object

Implements adtf::ucom::ant::iobject_ptr_base< T >.

◆ Reset()

template<typename T, typename StorageType>
tResult adtf::ucom::ant::detail::object_ptr_delegate_base< T, StorageType >::Reset ( const iobject_ptr< T > & i_oOther)
inlinefinaloverridevirtualnoexcept

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

Implements adtf::ucom::ant::iobject_ptr_base< T >.


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