|
Dev Essential
|
Model Subject utility to define a Model Subject that notifies one or more observers. More...
#include <access_observer.h>
Public Types | |
| typedef EVENT_CODE_T | event_code_type |
| local definition of the event code type | |
| typedef MODEL_SUBJECT_T | subject_type |
| local definition of the subject type | |
| typedef ModelObserverUtility< MODEL_SUBJECT_T, EVENT_CODE_T > | observer_type |
| local definition of the observer type to notify | |
Public Member Functions | |
| ModelSubjectUtility ()=default | |
| CTOR. | |
| ModelSubjectUtility (const ModelSubjectUtility &) | |
| copy CTOR which removes the observers in case of! | |
| ModelSubjectUtility & | operator= (const ModelSubjectUtility &) |
| copy assignment operator which removes the observers in case of! | |
| virtual | ~ModelSubjectUtility ()=default |
| DTOR. | |
| void | attachObserver (observer_type *observer) |
| adda a observer to notify. | |
| void | detachObserver (observer_type *observer) |
| remove a observer if in list. | |
Protected Member Functions | |
| void | notifyChanged (event_code_type event_code, subject_type &changed_subject, const std::string &additional_info) |
| helper utility function to notify the current observers | |
Model Subject utility to define a Model Subject that notifies one or more observers.
| MODEL_SUBJECT_T | the subject type |
| EVENT_CODE_T | the event code type |
|
inline |
adda a observer to notify.
| observer | the observer instance |
|
inline |
remove a observer if in list.
| observer | the observer to remove |
|
inlineprotected |
helper utility function to notify the current observers
| event_code | the eventcode |
| changed_subject | the subject changed |
| additional_info | additional info (see i.e. ddl::dd::datamodel::ModelEventCode) |
|
inline |
copy assignment operator which removes the observers in case of!