ADTF
Loading...
Searching...
No Matches
adtf::filter::interface_client< Interface > Class Template Reference

#include <graph_object.h>

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)
 
 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
 

Detailed Description

template<typename Interface>
class adtf::filter::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");
}
adtf::streaming::IRunner* /*pRunner*/) override
{
m_oInterfaceClient->DoSomething();
}
private:
};
#define ADTF_IID(_interface, _striid)
Definition adtf_iid.h:19
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29
#define ADTF_CLASS_ID_NAME(_class, _strcid, _strclabel)
Definition class_id.h:33
Definition filter.h:289
interface_client< Interface > CreateInterfaceClient(const char *strName)
Definition graph_object.h:1377
virtual tResult Process(base::flash::tNanoSeconds tmTrigger, streaming::ant::IRunner *pRunner)
streaming::ant::IRunner * CreateRunner(const char *strName, const cTriggerHint &oTriggerHint=cNoTriggerHint(), bool bForwardTriggerViaOutputPins=true)
Definition graph_object.h:66
Definition runner_intf.h:24
ant::IObject IObject
Alias always bringing the latest version of ant::IObject into scope.
Definition object_intf.h:109
A timestamp with nanosecond precision.
Definition chrono.h:23

Constructor & Destructor Documentation

◆ interface_client()

template<typename Interface>
adtf::filter::interface_client< Interface >::interface_client ( const ucom::ant::iobject_ptr< streaming::ant::IBindingClient > & pClient)
inline

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

Parameters
[in]pClientThe binding client to use.

Member Function Documentation

◆ Get()

template<typename Interface>
Interface & adtf::filter::interface_client< Interface >::Get ( ) const
inline
Returns
A reference to the wrapped interface.

◆ IsValid()

template<typename Interface>
bool adtf::filter::interface_client< Interface >::IsValid ( )
inline
Returns
Whether the client has a valid interface pointer or not.

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