ObserverInterconnector

ObserverInterconnector is in charge for inter-connecting the subjects with their observers, whatever are their specializations.

With this class, an observer can connect to the right subjects without having to know them. In the same fashion the subjects gets their client list automatically filled.

Constructors

this
this()

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Aliases

updateAll
alias updateAll = updateObservers

Updates the connections between the entities stored in the global list.

Functions

addObserver
void addObserver(Object observer)

Adds an observer to the list.

addObservers
void addObservers(Objs objs)

Adds a list of observer to the list. Optimized for bulk adding.

addSubject
void addSubject(Object subject)

Adds a subject to the list.

addSubjects
void addSubjects(Subjs subjs)

Adds several subjects to the list. Optimized for bulk addition.

beginUpdate
void beginUpdate()

Several entities will be added. This Avoids any superfluous update while adding. Every beginUpdate() must be followed by an endUpdate().

endUpdate
void endUpdate()

Several subjects or observers have been added. Decrements a counter and update the entities if it's equal to 0.

removeObserver
void removeObserver(Object observer)

Removes an observer from the list.

removeSubject
void removeSubject(Object subject)

Removes a subject from the entity list.

updateObservers
void updateObservers()

Updates the connections between the entities stored in the global list.

Meta