ADTF  3.18.4
cDisconnector

Utility class that can be used to disconnect a pin via RAII. More...

Public Member Functions

 cDisconnector (const adtf::ucom::ant::iobject_ptr< adtf::ucom::ant::IObject > &pObject, const char *strPinName)
 This will retrieve the pin from the given object. More...
 
 cDisconnector (const adtf::ucom::ant::iobject_ptr< adtf::streaming::ant::IPin > &pPin)
 Overload for construction with a pin instance. More...
 
 cDisconnector (const adtf::ucom::ant::iobject_ptr< adtf::streaming::ant::IInPin > &pPin)
 Overload for construction with a pin instance. More...
 
 cDisconnector (const adtf::ucom::ant::iobject_ptr< adtf::streaming::ant::IOutPin > &pPin)
 Overload for construction with a pin instance. More...
 
 cDisconnector (cDisconnector &&)=default
 
cDisconnectoroperator= (cDisconnector &&)=default
 
 ~cDisconnector ()
 This will disconnect the pin.
 

Private Attributes

adtf::ucom::weak_object_ptr< adtf::streaming::IPinm_pPin
 

Detailed Description

Utility class that can be used to disconnect a pin via RAII.

This is useful in tests to ensure there are no dangling references to samples streams.

Definition at line 131 of file connect_pins.h.

Constructor & Destructor Documentation

◆ cDisconnector() [1/4]

cDisconnector ( const adtf::ucom::ant::iobject_ptr< adtf::ucom::ant::IObject > &  pObject,
const char *  strPinName 
)

This will retrieve the pin from the given object.

Parameters
[in]pObjectThe object that has the pin.
strPinNameThe name of the pin.

◆ cDisconnector() [2/4]

Overload for construction with a pin instance.

Parameters
[in]pPinThe pin instance.

◆ cDisconnector() [3/4]

Overload for construction with a pin instance.

Parameters
[in]pPinThe pin instance.

◆ cDisconnector() [4/4]

Overload for construction with a pin instance.

Parameters
[in]pPinThe pin instance.