ADTF  3.18.2
interface_client< Interface >

Helper class that wraps a streaming::ant::IBindingClient. More...

Public Member Functions

 interface_client ()=default
 default constructor that initializes the object to an invalid state.
 
 interface_client (const ucom::ant::iobject_ptr< streaming::ant::IBindingClient > &pClient)
 /// initializes the object with an existing binding client. More...
 
 interface_client (const interface_client &)=default
 
 interface_client (interface_client &&)=default
 
interface_clientoperator= (const interface_client &)=default
 
interface_clientoperator= (interface_client &&)=default
 
bool IsValid ()
 
Interface & Get () const
 
Interface * operator-> () const
 

Private Attributes

ucom::ant::object_ptr< streaming::ant::IBindingClientm_pClient
 
ucom::ant::object_ptr< Interface > m_pInterface
 

Detailed Description

template<typename Interface>
class adtf::filter::flash::interface_client< Interface >

Helper class that wraps a streaming::ant::IBindingClient.

See cGraphObject::CreateInterfaceClient.

Example Usage

class IMyInterface: public adtf::ucom::IObject
{
public:
ADTF_IID(IMyInterface, "my_interface.iid");
public:
virtual void DoSomething() = 0;
};
class cMyFilter: public adtf::filter::cFilter
{
public:
ADTF_CLASS_ID_NAME(cMyFilter, "my_filter.filter.example.cid", "My Filter");
cMyFilter()
{
m_oInterfaceClient = CreateInterfaceClient<IMyInterface>("my_interface");
CreateRunner("do_something");
}
tResult Process(adtf::base::tNanoSeconds /*tmTrigger*/,
adtf::streaming::IRunner* /*pRunner*/) override
{
m_oInterfaceClient->DoSomething();
}
private:
};
#define ADTF_IID(_interface, _striid)
Common macro to enable correct treatment of interface classes by the adtf::ucom::ucom_cast<>
Definition: adtf_iid.h:17
Copyright © Audi Electronics Venture GmbH.
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
#define ADTF_CLASS_ID_NAME(_class, _strcid, _strclabel)
Common macro to enable correct treatment of class identifier AND Class Name by IClassInfo.
Definition: class_id.h:33
Helper class that wraps a streaming::ant::IBindingClient.
Definition: graph_object.h:67
The Interface defines a runnable item of the GraphObjects providing a IRuntimeBehaviour.
Definition: runner_intf.h:24
Base class for every interface type within the uCOM.
Definition: object_intf.h:31

Definition at line 66 of file graph_object.h.

Constructor & Destructor Documentation

◆ interface_client()

/// initializes the object with an existing binding client.

Parameters
[in]pClientThe binding client to use.

Definition at line 76 of file graph_object.h.

Member Function Documentation

◆ Get()

Interface& Get ( ) const
inline
Returns
A reference to the wrapped interface.

Definition at line 107 of file graph_object.h.

References adtf_string_intf, IS_FAILED, THROW_ERROR_DESC, and THROW_IF_FAILED_DESC.

◆ IsValid()

bool IsValid ( )
inline
Returns
Whether the client has a valid interface pointer or not.

Definition at line 88 of file graph_object.h.

References IS_FAILED.