OpenLexocad
28.0
|
#include <Observer.h>
Classes | |
struct | CompareObservers |
struct | ObserverHolder |
Public Types | |
typedef Observer< _MessageType > | ObserverType |
typedef _MessageType | MessageType |
typedef Subject< _MessageType > | SubjectType |
Public Member Functions | |
Subject () | |
virtual | ~Subject () |
void | attach (Observer< _MessageType > *ToObserv) |
void | detach (Observer< _MessageType > *ToObserv) |
void | detachAll () |
void | notify_internal (_MessageType &rcReason, size_t deep) |
void | notify (_MessageType &rcReason) |
Observer< _MessageType > * | get (const char *Name) |
virtual const char * | subject_name (void) |
void | resetObserverTime () |
std::map< std::string, double > | getObserverTime () |
Protected Types | |
typedef std::set< ObserverHolder, CompareObservers > | ObserverSetType |
Protected Attributes | |
ObserverSetType | _ObserverSet |
ObserverSetType | _ObserverSet_AddedLater |
Set of attached observers. More... | |
ObserverSetType | _ObserverSet_AddedLaterCopy |
Set of attached observers at running notify. More... | |
bool | _running_notify |
bool | _allDetachedWhileRunningNotify = false |
std::list< _MessageType > | _messages_WhileRunningNotify |
std::map< std::string, double > | _observerTime |
Subject class Implementation of the well known Observer Design Pattern. The observed object, which inherit FCSubject, will call all its observers in case of changes. A observer class has to Attach itself to the observed object.
typedef _MessageType Base::Subject< _MessageType >::MessageType |
|
protected |
typedef Observer<_MessageType> Base::Subject< _MessageType >::ObserverType |
typedef Subject<_MessageType> Base::Subject< _MessageType >::SubjectType |
|
inline |
A constructor. No special function so far.
|
inlinevirtual |
A destructor. No special function so far.
|
inline |
|
inline |
|
inline |
Clears the list of all registered observers.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in Core::CoreDocument, Core::CoreApplication, and Core::AbstractBehaviorMode.
|
protected |
|
protected |
|
protected |
|
protected |
Set of attached observers.
|
protected |
Set of attached observers at running notify.
|
protected |
|
protected |