SmartSoft Component-Developer API
Public Member Functions | Protected Member Functions | List of all members
Smart::InputTaskTrigger< InputType > Class Template Reference

#include <smartInputTaskTrigger.h>

Inheritance diagram for Smart::InputTaskTrigger< InputType >:
Smart::IInputHandler< InputType > Smart::TaskTriggerSubject

Public Member Functions

 InputTaskTrigger (InputSubject< InputType > *subject, const unsigned int &prescaleFactor=1)
 Default constructor. More...
 
virtual ~InputTaskTrigger ()=default
 Default destructor. More...
 
Smart::StatusCode getUpdate (InputType &update) const
 Method to get a copy of the last update (if there was any). More...
 
- Public Member Functions inherited from Smart::IInputHandler< InputType >
 IInputHandler (InputSubject< InputType > *subject, const unsigned int &prescaleFactor=1)
 The default constructor. More...
 
virtual ~IInputHandler ()
 The default destructor. More...
 
- Public Member Functions inherited from Smart::TaskTriggerSubject
 TaskTriggerSubject ()
 
virtual ~TaskTriggerSubject ()
 
void attach (TaskTriggerObserver *observer, const unsigned int &prescaleFactor=1)
 
void detach (TaskTriggerObserver *observer)
 

Protected Member Functions

void setUpdate (const InputType &input, const Smart::StatusCode &updateStatus=Smart::SMART_OK)
 Store a copy of the last update within the internal object. More...
 
virtual void handle_input (const InputType &input)
 This is the main input-handler method that will be automatically called from the given subject each time the subject receives input-data. More...
 
- Protected Member Functions inherited from Smart::IInputHandler< InputType >
void attach_self (const unsigned int &prescale=1)
 calls subject->attach(this); More...
 
void detach_self ()
 calls subject->detach(this); More...
 
- Protected Member Functions inherited from Smart::TaskTriggerSubject
void trigger_all_tasks ()
 

Additional Inherited Members

- Protected Attributes inherited from Smart::IInputHandler< InputType >
InputSubject< InputType > * subject
 this is the subject-pointer (can be used in derived classes) More...
 

Constructor & Destructor Documentation

◆ InputTaskTrigger()

template<class InputType >
Smart::InputTaskTrigger< InputType >::InputTaskTrigger ( InputSubject< InputType > *  subject,
const unsigned int &  prescaleFactor = 1 
)
inline

Default constructor.

◆ ~InputTaskTrigger()

template<class InputType >
virtual Smart::InputTaskTrigger< InputType >::~InputTaskTrigger ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ getUpdate()

template<class InputType >
Smart::StatusCode Smart::InputTaskTrigger< InputType >::getUpdate ( InputType &  update) const
inline

Method to get a copy of the last update (if there was any).

Parameters
updatethe reference to the InputObject to overwrite
Returns
the status code of the last update

◆ handle_input()

template<class InputType >
virtual void Smart::InputTaskTrigger< InputType >::handle_input ( const InputType &  input)
inlineprotectedvirtual

This is the main input-handler method that will be automatically called from the given subject each time the subject receives input-data.

This method can be overloaded in derived classes to implement a customized input-handling strategy.

Parameters
inputthe input-data reference

Implements Smart::IInputHandler< InputType >.

◆ setUpdate()

template<class InputType >
void Smart::InputTaskTrigger< InputType >::setUpdate ( const InputType &  input,
const Smart::StatusCode updateStatus = Smart::SMART_OK 
)
inlineprotected

Store a copy of the last update within the internal object.

Parameters
inputthe input-data reference
updateStatusthe optional update status to set (default is SMART_OK)

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