ADTF
trigger_pipe_item< INTERFACE >

Default implementation class template for a ITriggerPipeItem. More...

Inheritance diagram for trigger_pipe_item< INTERFACE >:
[legend]

Public Types

typedef trigger_pipe_source< INTERFACE > _base_type
 used base type derived from
 

Public Member Functions

 trigger_pipe_item ()=default
 CTOR.
 
 trigger_pipe_item (const char *strName)
 CTOR with name. More...
 
 trigger_pipe_item (const char *strName, adtf::base::ant::IRunnable &oRunnable)
 CTOR further initializer. More...
 
tResult SetFullName (const char *strName)
 
tResult Run (tTimeStamp tmTimeofActivation, adtf::base::ant::IRunnable::tActivationType ui32ActivationType, const void *pvUserData, size_t nUserDataSize) override
 This method will be called to activate the registered m_pRunnable by a given activation type. More...
 
void SetRunnable (adtf::base::ant::IRunnable &oRunnable)
 Sets the Runnable implementation to call if Run is called. More...
 
- Public Member Functions inherited from object< ITriggerPipeItem, trigger_pipe_source< ITriggerPipeItem > >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object. More...
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying. More...
 
void Destroy () const override
 Destruct and deallocate instantiations of type IObject. More...
 
- Public Member Functions inherited from IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast() More...
 

Private Attributes

adtf::base::ant::IRunnablem_pRunnable = _base_type::m_pNothingToDoRunnable
 Nothing to do runnable. More...
 
adtf::ucom::ant::object_ptr< adtf::base::elasto::IErrorHandling::IErrorHandlerm_pErrorHandler
 

Additional Inherited Members

- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 

Detailed Description

template<typename INTERFACE = ITriggerPipeItem>
class adtf::streaming::ant::trigger_pipe_item< INTERFACE >

Default implementation class template for a ITriggerPipeItem.

This template helps to use the default implementation in certain classes and will prevent multiple inheritance.

Template Parameters
INTERFACEThe interface type derived from ITriggerPipeItem.

Definition at line 154 of file triggerpipe.h.

Constructor & Destructor Documentation

◆ trigger_pipe_item() [1/2]

trigger_pipe_item ( const char *  strName)
inline

CTOR with name.

Parameters
[in]strNameName of the pipe item

Definition at line 171 of file triggerpipe.h.

◆ trigger_pipe_item() [2/2]

trigger_pipe_item ( const char *  strName,
adtf::base::ant::IRunnable oRunnable 
)
inline

CTOR further initializer.

Parameters
[in]strNameName of the pipe item
[in]oRunnableRunnable Reference to call the Run

Definition at line 177 of file triggerpipe.h.

References trigger_pipe_item< INTERFACE >::SetRunnable().

Member Function Documentation

◆ Run()

tResult Run ( tTimeStamp  tmTimeofActivation,
adtf::base::ant::IRunnable::tActivationType  ui32ActivationType,
const void *  pvUserData,
size_t  nUserDataSize 
)
inlineoverride

This method will be called to activate the registered m_pRunnable by a given activation type.

Then the Registered subitems will be called in order of ITriggerPipeItem::tPriority.

Parameters
[in]tmTimeofActivationTime of activation.Usually this is the StreamTime.
[in]ui32ActivationTypeThe activation type for running.
[in]pvUserDatapointer to a activation structure depending on the activation type.
[in]nUserDataSizeSize of the activation structure. (in byte)
Returns
Standard result code.
Return values
ERR_CANCELEDDepending on the caller(timer, cyclic thread) it will break cyclic running.

Definition at line 202 of file triggerpipe.h.

References IErrorHandling::IErrorHandler::Handle(), IS_FAILED, trigger_pipe_item< INTERFACE >::m_pRunnable, IRunnable::Run(), and cTriggerPipeSourceImpl::RunSubs().

◆ SetRunnable()

void SetRunnable ( adtf::base::ant::IRunnable oRunnable)
inline

Sets the Runnable implementation to call if Run is called.

See also
trigger_pipe_item::Run implementation
Parameters
[in]oRunnableThe reference to the Runnable instance.
Remarks
Make sure the given oRunnable lives at least longer than the RunnerPipeItem
Returns
void

Definition at line 225 of file triggerpipe.h.

References trigger_pipe_item< INTERFACE >::m_pRunnable.

Referenced by cRunner::cRunner(), trigger_pipe_item< INTERFACE >::trigger_pipe_item(), and cRunner::SetRunnable().

Member Data Documentation

◆ m_pRunnable

Nothing to do runnable.

helper to prevent if statement within Run implementation

Definition at line 163 of file triggerpipe.h.

Referenced by trigger_pipe_item< INTERFACE >::Run(), and trigger_pipe_item< INTERFACE >::SetRunnable().