Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

baci::BACICallback Class Reference

#include <baciBACICallback.h>

Collaboration diagram for baci::BACICallback:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BACICallback (const int &id_, Callback_ptr callback_, const BACIValue::Type type_, const CBDescIn &descIn_, BACIComponent *component_p)
 ~BACICallback ()
BACICallbackoperator= (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
BACIComponentgetComponent () const

Private Member Functions

 BACICallback (const BACICallback &)

Private Attributes

int id_m
Callback_ptr callback_mp
BACIValue::Type type_m
CBDescIn descIn_m
BACIComponentcomponent_mp
int failureCount_m
bool removeOnFailure_m

Static Private Attributes

static const int failureLimitCount_m

Detailed Description

BACI Callback wrapper Callbacks are needed for actions and monitors

Author:
Matej Sekoranja, Jozef Stefan Institute, Slovenia

Constructor & Destructor Documentation

baci::BACICallback::BACICallback ( const int &  id_,
Callback_ptr  callback_,
const BACIValue::Type  type_,
const CBDescIn descIn_,
BACIComponent component_p 
) [inline]

Contructor

Parameters:
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.


Member Function Documentation

bool baci::BACICallback::doRemoveOnFailure (  )  const [inline]

Set if callback can be removed if invokation failure limit is exceeded

Returns:
true if it can be removed, otherwise false
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

Returns:
callback reference
BACIComponent* baci::BACICallback::getComponent (  )  const [inline]

Get Component (owner of the callback)

Returns:
pointer to Component object
CBDescIn baci::BACICallback::getDescIn (  )  const [inline]

Get callback descriptor

Returns:
callback descriptor (passed by client)
int baci::BACICallback::getID (  )  const [inline]

Get callback ID

Returns:
callback ID
BACIValue::Type baci::BACICallback::getType (  )  const [inline]

Get callback type

Returns:
callback type
bool baci::BACICallback::isOK (  )  [inline]

Get callback status (if invokations are successful)

Returns:
true if OK, otherwise false
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

Parameters:
removeOnFailure_ true if it can be removed, otherwise false
void baci::BACICallback::succeeded (  )  [inline]

Report successful invokation Resets failure counter to zero


Member Data Documentation

Callback reference

Referenced by operator=().

Callback owner

Referenced by operator=().

Callback descriptor (passed by client)

Referenced by operator=().

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==().

State if callback can be removed if invokation failure counter si exceeded

Referenced by operator=().

Callback type

Referenced by operator=().


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