109 log(
int level,
string fmt);
134 abstract
bool filter(
string event_id, hash<auto> event);
141hashdecl ObserverEventInfo {
145 # event filter object
146 *AbstractEventFilter filter;
148 # Map of subscribed event IDs; if the map is empty, then all events are registered
149 hash<string, bool> event_map;
153class ObserverWrapper :
public Observer {
162 constructor(
object obj);
166 update(
string event_id, hash<auto> data_);
This abstract class can be used to filter events that are raised on an Observer.
Definition: Observable.qc.dox.h:130
abstract bool filter(string event_id, hash< auto > event)
If this returns True, then the event is raised.
This class represents an observable subject that waits for external confirmation before raising event...
Definition: Observable.qc.dox.h:120
abstract observersReady()
Called when all observers have been added to the object.
This class represents an observable subject that will notify all of its registered observers.
Definition: Observable.qc.dox.h:28
hash< ObserverEventInfo > registerObserverEventsArgs(hash< ObserverEventInfo > info, list< auto > events)
Registers observer events.
registerObserverWithFilter(object observer, AbstractEventFilter filter)
The method registers the given observer.
registerObserver(object observer)
The method registers the given observer.
registerObserver(Observer observer)
The method registers the given observer.
registerObserverWithFilter(Observer observer, AbstractEventFilter filter)
The method registers the given observer.
log(int level, string fmt)
Reimplement this method to implement logging.
hash< string, hash< ObserverEventInfo > > observer_map
maps from object hash -> object
Definition: Observable.qc.dox.h:33
bool deregisterObserver(Observer observer)
The method deregisters the given observer.
bool deregisterObserver(object observer)
The method deregisters the given observer.
notifyObservers(string event_id, hash< auto > data_)
The method notifies all subscribed observers.
This abstract class represents an observer that will get notified by the subject it observes.
Definition: Observer.qc.dox.h:26
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27