ADTF
iobject_ptr_base< T >abstract

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

Inheritance diagram for iobject_ptr_base< T >:
[legend]

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. More...
 
virtual tResult Reset (const iobject_ptr< T > &i_oOther)=0
 Reset this object_ptr<> with the content of another iobject_ptr<> More...
 
virtual T * operator-> () const =0
 Operator-> overload to treat object_ptr<> types like real pointers. More...
 
virtual detail::iobject_ptr_ref< size_t > * GetObjPtrRef () const =0
 

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

Definition at line 59 of file object_ptr_intf.h.

Member Function Documentation

◆ Get()

◆ operator->()

virtual T* operator-> ( ) const
pure virtual

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

Returns
Pointer to shared object

Implemented in object_ptr_delegate_base< T, StorageType >, object_ptr_delegate_base< const IObject, StorageType >, and object_ptr_delegate_base< IObject, StorageType >.

◆ Reset()

virtual tResult 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 object_ptr_delegate_base< T, StorageType >.

Referenced by adtf::streaming::devil::add_binding_proxy(), adtf::streaming::devil::add_data_in_port(), adtf::streaming::devil::add_data_out_port(), adtf::streaming::devil::add_graph_object(), adtf::streaming::devil::add_sample_stream_in_port(), adtf::streaming::devil::add_sample_stream_out_port(), cLastSampleReader::GetLastSample(), cSampleReader::GetLastType(), cStreamItem::GetObject(), configuration< Interface >::GetProperties(), cStreamItem::GetSample(), cSampleReader::GetSampleInStream(), adtf::streaming::ant::operator>>(), and adtf::ucom::ant::reset_object_ptr().