CEL

Public API Reference

iTrigger Struct Reference

This is a trigger. More...

#include <tools/triggers.h>

Inheritance diagram for iTrigger:

List of all members.

Public Member Functions

virtual void ActivateTrigger ()=0
 Activate the trigger.
virtual bool Check ()=0
 Check the trigger immediatelly and return true if it is valid.
virtual void ClearCallback ()=0
 Clear the callback.
virtual void DeactivateTrigger ()=0
 Deactivate the trigger.
virtual bool LoadAndActivateTrigger (iCelDataBuffer *databuf)=0
 Activate the trigger and load state from databuf (persistence).
virtual void RegisterCallback (iTriggerCallback *callback)=0
 Register a callback with this trigger.
virtual void SaveTriggerState (iCelDataBuffer *databuf)=0
 Save trigger state.

Detailed Description

This is a trigger.

Triggers are created by trigger factories. To be able to use your own trigger implementations you must also make associated trigger factories. See iTriggerFactory.

Triggers must start in deactivated state.

Definition at line 52 of file triggers.h.


Member Function Documentation

virtual void iTrigger::ActivateTrigger (  )  [pure virtual]

Activate the trigger.

Note that triggers start deactivated.

virtual bool iTrigger::Check (  )  [pure virtual]

Check the trigger immediatelly and return true if it is valid.

This function does nothing else. Only the condition of the trigger is tested. If this function returns true then it should also have deactivated the trigger and fired the callbacks. This is not the responsability of the caller.

virtual void iTrigger::ClearCallback (  )  [pure virtual]

Clear the callback.

virtual void iTrigger::DeactivateTrigger (  )  [pure virtual]

Deactivate the trigger.

Note that triggers start deactivated.

virtual bool iTrigger::LoadAndActivateTrigger ( iCelDataBuffer databuf  )  [pure virtual]

Activate the trigger and load state from databuf (persistence).

Returns:
false on failure (data in buffer doesn't match what we expect).
virtual void iTrigger::RegisterCallback ( iTriggerCallback callback  )  [pure virtual]

Register a callback with this trigger.

When the trigger fires it will call this callback. A trigger supports only one callback.

virtual void iTrigger::SaveTriggerState ( iCelDataBuffer databuf  )  [pure virtual]

Save trigger state.


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

Generated for CEL: Crystal Entity Layer 2.0 by doxygen 1.6.1