ADTF
Loading...
Searching...
No Matches
adtf::streaming::cRunner Class Reference

#include <runner.h>

Inherits adtf::streaming::trigger_pipe_item< INamedGraphObject, IRunner >.

Public Member Functions

 cRunner ()
 CTOR.
 
 ~cRunner () override
 DTOR.
 
 cRunner (const char *strName)
 
 cRunner (const char *strName, base::ant::IRunnable &oRunnable)
 
 cRunner (const char *strName, base::flash::IRunnable &oRunnable)
 
template<typename CALLABLE>
 cRunner (const char *strName, CALLABLE &&oCallable)
 
void SetRunnable (base::ant::IRunnable &oRunnable)
 
void SetRunnable (base::flash::IRunnable &oRunnable)
 
void SetRunnable (base::ant::IRunnable::tRunFunction fcRunFunction)
 
void SetRunnable (base::flash::IRunnable::tRunFunction fcRunFunction)
 
template<typename CALLABLE>
void SetCallable (CALLABLE &&oCallable)
 
- Public Member Functions inherited from adtf::streaming::trigger_pipe_item< INamedGraphObject, IRunner >
 trigger_pipe_item ()=default
 CTOR.
 
 trigger_pipe_item (const char *strName)
 
 trigger_pipe_item (const char *strName, adtf::base::ant::IRunnable &oRunnable)
 
void SetRunnable (adtf::base::ant::IRunnable &oRunnable)
 
void SetRunnable (adtf::base::flash::IRunnable &oRunnable)
 
void SetCallable (CALLABLE &&callable)
 
tResult RegisterSubItem (const adtf::ucom::ant::iobject_ptr< ITriggerPipeItem > &pSubRun, ITriggerPipeItem::tPriority ui32Prio) override
 
tResult UnregisterSubItem (const adtf::ucom::ant::iobject_ptr< ITriggerPipeItem > &pSubRun) override
 
tResult ChangePriority (const adtf::ucom::ant::iobject_ptr< ITriggerPipeItem > &pSubRun, ITriggerPipeItem::tPriority ui32Prio) override
 
tResult GetSubItems (adtf::ucom::ant::iobject_enum< const ITriggerPipeItem > &lstSubItems) const override
 
tResult Run (tTimeStamp tmTimeofActivation, adtf::base::ant::IRunnable::tActivationType ui32ActivationType, const void *pvUserData, size_t nUserDataSize) override
 
tResult Run (adtf::base::flash::tNanoSeconds tmTimeofActivation, adtf::base::ant::IRunnable::tActivationType ui32ActivationType, const void *pvUserData, size_t nUserDataSize) override
 
tResult RegisterTriggerParent (const ant::ITriggerPipeSource *pParent) override
 
tResult UnregisterTriggerParent (const ant::ITriggerPipeSource *pParent) override
 
tResult GetTriggerParents (const ucom::nitro::ifunction< tResult(const ant::ITriggerPipeSource *)> &fnCallback) const override
 
tResult GetName (base::ant::IString &&strName) const
 
tResult SetName (const char *strName)
 
tResult SetParent (const ucom::ant::IObject *oParentObject)
 
tResult GetParent (const ucom::ant::IObject *&poParentObject) const
 
- Public Member Functions inherited from adtf::ucom::catwo::object< base::ant::IRunnable, base::flash::IRunnable, ant::ITriggerPipeSource, ant::ITriggerPipeItem, quiet::ITriggerPipeHierachy, INTERFACES... >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Additional Inherited Members

- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

Default runner implementation as a trigger pipe item. It can be used as a simple wrapper to call any Runnable or callable object within a trigger pipe.

Constructor & Destructor Documentation

◆ cRunner() [1/4]

adtf::streaming::cRunner::cRunner ( const char * strName)

CTOR to set a name

Parameters
strNamename for the graph object

◆ cRunner() [2/4]

adtf::streaming::cRunner::cRunner ( const char * strName,
base::ant::IRunnable & oRunnable )

CTOR to set a name and initialize with a Runnable instance immediatelly

Parameters
strNamename for the graph object
oRunnablereference to the runnable which will be called by the runner.
Remarks
Make sure the given oRunnable lives at least longer than the cRunner instance

◆ cRunner() [3/4]

adtf::streaming::cRunner::cRunner ( const char * strName,
base::flash::IRunnable & oRunnable )
explicit

CTOR to set a name and initialize with a Runnable instance immediatelly

Parameters
strNamename for the graph object
oRunnablereference to the runnable which will be called by the runner.
Remarks
Make sure the given oRunnable lives at least longer than the cRunner instance

◆ cRunner() [4/4]

template<typename CALLABLE>
adtf::streaming::cRunner::cRunner ( const char * strName,
CALLABLE && oCallable )
inline

CTOR to set a name and initialize with any callable immediately. The callable must be tranformable via base::transform_invocable.

Parameters
strNamename for the graph object
oCallablecallable (lambda, functor, std::function, ...) to be called by the runner.
Remarks
Make sure binded objects to the given oCallable lives at least longer than the cRunner instance

Member Function Documentation

◆ SetCallable()

template<typename CALLABLE>
void adtf::streaming::cRunner::SetCallable ( CALLABLE && oCallable)
inline

Sets the Runnable implementation to call if Run is called by the trigger item. The callable object will be wrapped into a base::runnable and managed by the trigger pipe item. It needs to follow the signatures of the possible runnable Run function: See adtf::base::detail::runnable

Parameters
[in]callableThe callable object to wrap into a base::runnable and call on Run.
Remarks
Make sure binded objects to the given callable lives at least longer than the cRunner instance

◆ SetRunnable() [1/4]

void adtf::streaming::cRunner::SetRunnable ( base::ant::IRunnable & oRunnable)

Sets the runnable implementation to call if Run is called.

Parameters
[in]oRunnableThe reference to the Runnable instance.
Remarks
Make sure the given oRunnable lives at least longer than the cRunner instance

◆ SetRunnable() [2/4]

void adtf::streaming::cRunner::SetRunnable ( base::ant::IRunnable::tRunFunction fcRunFunction)

Sets a run function implementation to call if Run is called by the trigger item.

Parameters
[in]fcRunFunctionThe function to call on Run.
Remarks
Make sure binded objects to the given fcRunFunction lives at least longer than the cRunner instance

◆ SetRunnable() [3/4]

void adtf::streaming::cRunner::SetRunnable ( base::flash::IRunnable & oRunnable)

Sets the runnable implementation to call if Run is called.

Parameters
[in]oRunnableThe reference to the Runnable instance.
Remarks
Make sure the given oRunnable lives at least longer than the cRunner instance

◆ SetRunnable() [4/4]

void adtf::streaming::cRunner::SetRunnable ( base::flash::IRunnable::tRunFunction fcRunFunction)

Sets a run function implementation to call if Run is called by the trigger item.

Parameters
[in]fcRunFunctionThe function to call on Run.
Remarks
Make sure binded objects to the given fcRunFunction lives at least longer than the cRunner instance

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