ADTF
|
Model Subject utility to define a Model Subject that notifies one or more observers. More...
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! More... | |
virtual | ~ModelSubjectUtility ()=default |
DTOR. | |
void | attachObserver (observer_type *observer) |
adda a observer to notify. More... | |
void | detachObserver (observer_type *observer) |
remove a observer if in list. More... | |
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 More... | |
Private Attributes | |
std::vector< observer_type * > | _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 |
Definition at line 68 of file access_observer.h.
|
inline |
adda a observer to notify.
observer | the observer instance |
Definition at line 112 of file access_observer.h.
|
inline |
remove a observer if in list.
observer | the observer to remove |
Definition at line 126 of file access_observer.h.
|
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) |
Definition at line 144 of file access_observer.h.
|
inline |
copy assignment operator which removes the observers in case of!
Definition at line 95 of file access_observer.h.