#include <baciBACICallback.h>
Public Member Functions | |
BACICallback (const int &id_, Callback_ptr callback_, const BACIValue::Type type_, const CBDescIn &descIn_, BACIComponent *component_p) | |
~BACICallback () | |
BACICallback & | operator= (const BACICallback &cb) |
bool | operator== (const BACICallback &cb) const |
int | getID () const |
void | succeeded () |
void | failed () |
bool | isOK () |
void | setRemoveOnFailure (bool removeOnFailure_) |
bool | doRemoveOnFailure () const |
Callback_ptr | getCallback () const |
BACIValue::Type | getType () const |
CBDescIn | getDescIn () const |
BACIComponent * | getComponent () const |
Private Member Functions | |
BACICallback (const BACICallback &) | |
Private Attributes | |
int | id_m |
Callback_ptr | callback_mp |
BACIValue::Type | type_m |
CBDescIn | descIn_m |
BACIComponent * | component_mp |
int | failureCount_m |
bool | removeOnFailure_m |
Static Private Attributes | |
static const int | failureLimitCount_m |
BACI Callback wrapper Callbacks are needed for actions and monitors
baci::BACICallback::BACICallback | ( | const int & | id_, | |
Callback_ptr | callback_, | |||
const BACIValue::Type | type_, | |||
const CBDescIn & | descIn_, | |||
BACIComponent * | component_p | |||
) | [inline] |
Contructor
id_ | id of the callback to be notified | |
callback_ | callback reference | |
type_ | callback type (e.g. type double means callback is type of CBdouble) | |
descIn_ | callback descriptor (passed by client) | |
component_p | parent object where callback is saved (owner of the callback) |
baci::BACICallback::~BACICallback | ( | ) | [inline] |
Destructor
baci::BACICallback::BACICallback | ( | const BACICallback & | ) | [private] |
ALMA C++ coding standards state copy constructors should be disabled.
bool baci::BACICallback::doRemoveOnFailure | ( | ) | const [inline] |
Set if callback can be removed if invokation failure limit is exceeded
void baci::BACICallback::failed | ( | ) |
Report failed invokation Increases failure counter and destroys callback if failure limit has been exceeded
Callback_ptr baci::BACICallback::getCallback | ( | ) | const [inline] |
Get callback reference
BACIComponent* baci::BACICallback::getComponent | ( | ) | const [inline] |
Get Component (owner of the callback)
CBDescIn baci::BACICallback::getDescIn | ( | ) | const [inline] |
Get callback descriptor
int baci::BACICallback::getID | ( | ) | const [inline] |
Get callback ID
BACIValue::Type baci::BACICallback::getType | ( | ) | const [inline] |
Get callback type
bool baci::BACICallback::isOK | ( | ) | [inline] |
Get callback status (if invokations are successful)
BACICallback& baci::BACICallback::operator= | ( | const BACICallback & | cb | ) | [inline] |
Assignment operator
References callback_mp, component_mp, descIn_m, failureCount_m, id_m, removeOnFailure_m, and type_m.
bool baci::BACICallback::operator== | ( | const BACICallback & | cb | ) | const [inline] |
Compare (equals) operator
References id_m.
void baci::BACICallback::setRemoveOnFailure | ( | bool | removeOnFailure_ | ) | [inline] |
Get callback remove on failure state
removeOnFailure_ | true if it can be removed, otherwise false |
void baci::BACICallback::succeeded | ( | ) | [inline] |
Report successful invokation Resets failure counter to zero
Callback_ptr baci::BACICallback::callback_mp [private] |
Callback reference
Referenced by operator=().
BACIComponent* baci::BACICallback::component_mp [private] |
Callback owner
Referenced by operator=().
CBDescIn baci::BACICallback::descIn_m [private] |
Callback descriptor (passed by client)
Referenced by operator=().
int baci::BACICallback::failureCount_m [private] |
Invokation failure counter
Referenced by operator=().
const int baci::BACICallback::failureLimitCount_m [static, private] |
Invokation failure limit
int baci::BACICallback::id_m [private] |
Callback ID
Referenced by operator=(), and operator==().
bool baci::BACICallback::removeOnFailure_m [private] |
State if callback can be removed if invokation failure counter si exceeded
Referenced by operator=().
BACIValue::Type baci::BACICallback::type_m [private] |
Callback type
Referenced by operator=().