FreePOOMA  2.4.1
Classes | Functions
ObserverEvent.h File Reference

ObserverEvent class - a base class for all events that will be passed on to observers from observables. More...

#include "Utilities/Unique.h"
Include dependency graph for ObserverEvent.h:
This graph shows which files directly or indirectly include this file:

Classes

class  ObserverEvent
 The Observer class, along with the Observable class, are used to implement the observer pattern. More...

Functions

template<class Obj >
bool checkDynamicID (Obj &, ObserverEvent::ID_t)
 checkDynamicID(obj, ID) is a specializable function that is used by some classes to check the dynamic ID value stored in the first argument by some means.

Detailed Description

ObserverEvent class - a base class for all events that will be passed on to observers from observables.

It includes one integer data member used to indicate to observer subclasses what kind of event it is.


Function Documentation

template<class Obj >
bool checkDynamicID ( Obj &  ,
ObserverEvent::ID_t   
) [inline]

checkDynamicID(obj, ID) is a specializable function that is used by some classes to check the dynamic ID value stored in the first argument by some means.

If it is the same as the given ID, this returns false. If it is not the same, it should return true and change the state of obj to indicate that it has "seen" the given ID.

The default version of this just returns true, generally meaning, "this ID has not been seen, proceed".