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 Activate ()=0
 Activate this trigger.
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 Deactivate ()=0
 Deactivate this trigger.
virtual void DeactivateTrigger ()=0
 Deactivate the trigger.
virtual void RegisterCallback (iTriggerCallback *callback)=0
 Register a callback with this trigger.

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 56 of file triggers.h.


Member Function Documentation

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

Activate this trigger.

This means it will process events again. Note that this is not equivalent to ActivateTrigger() since the this function will actually activate the trigger to the same state as it was when the trigger was deactivated. ActivateTrigger() on the other hand, just activates the trigger to its initial state.

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::Deactivate (  )  [pure virtual]

Deactivate this trigger.

This is not the same as DeactivateTrigger() since this function will remember the state when it was deactivated and allow Activate() to restore it to exactly that state.

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

Deactivate the trigger.

Note that triggers start deactivated.

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.


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

Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1