Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
ObjexxFCL::ObserverSingle Class Reference

ObserverSingle: Combined Subject + Single Observer Abstract Base Class. More...

#include <ObserverSingle.hh>

Inheritance diagram for ObjexxFCL::ObserverSingle:
Inheritance graph
[legend]

Public Member Functions

 ~ObserverSingle () override
 Destructor. More...
 
void insert_observer (Observer &observer) const override
 Insert an Observer. More...
 
void remove_observer (Observer &observer) const override
 Remove an Observer. More...
 
bool has_observer () const override
 Has At Least One Observer? More...
 
void notify_destructed () const
 Notify Observers That This Subject is Being Destructed. More...
 
Observerobserver_p () const
 Observer. More...
 
- Public Member Functions inherited from ObjexxFCL::Observer
virtual ~Observer ()
 Destructor. More...
 
void notify () const
 Notify Observers That This Subject Has Changed. More...
 
bool acyclic (Observer &) const
 Acyclic After Adding an Observer of This Subject? More...
 
virtual void update ()=0
 Update. More...
 
virtual void destructed (Subject const &)=0
 Update for Destruction of a Subject. More...
 

Protected Member Functions

 ObserverSingle ()
 Default Constructor. More...
 
 ObserverSingle (ObserverSingle const &)
 Copy Constructor. More...
 
ObserverSingleoperator= (ObserverSingle const &)
 Copy Assignment. More...
 
- Protected Member Functions inherited from ObjexxFCL::Observer
 Observer ()
 Default Constructor. More...
 
 Observer (Observer const &)
 Copy Constructor. More...
 
Observeroperator= (Observer const &)
 Copy Assignment. More...
 

Private Attributes

Observerobserver_p_
 Observer of this Subject (non-owning pointer) More...
 

Detailed Description

ObserverSingle: Combined Subject + Single Observer Abstract Base Class.

Constructor & Destructor Documentation

ObjexxFCL::ObserverSingle::ObserverSingle ( )
inlineprotected

Default Constructor.

ObjexxFCL::ObserverSingle::ObserverSingle ( ObserverSingle const &  )
inlineprotected

Copy Constructor.

ObjexxFCL::ObserverSingle::~ObserverSingle ( )
inlineoverride

Destructor.

References notify_destructed().

Member Function Documentation

bool ObjexxFCL::ObserverSingle::has_observer ( ) const
inlineoverridevirtual

Has At Least One Observer?

Implements ObjexxFCL::Observer.

References observer_p_.

void ObjexxFCL::ObserverSingle::insert_observer ( Observer observer) const
inlineoverridevirtual
void ObjexxFCL::ObserverSingle::notify_destructed ( ) const
inline

Notify Observers That This Subject is Being Destructed.

References ObjexxFCL::Observer::destructed(), and observer_p_.

Referenced by ~ObserverSingle().

Observer* ObjexxFCL::ObserverSingle::observer_p ( ) const
inline

Observer.

References observer_p_.

ObserverSingle& ObjexxFCL::ObserverSingle::operator= ( ObserverSingle const &  )
inlineprotected

Copy Assignment.

void ObjexxFCL::ObserverSingle::remove_observer ( Observer observer) const
inlineoverridevirtual

Member Data Documentation

Observer* ObjexxFCL::ObserverSingle::observer_p_
mutableprivate

Observer of this Subject (non-owning pointer)

Referenced by has_observer(), insert_observer(), notify_destructed(), observer_p(), and remove_observer().


The documentation for this class was generated from the following file: