Observer Class Reference

Base class for objects to receive notification of attachment and detachment. More...

#include <Observer.h>

List of all members.

Public Member Functions

virtual void attached (Subject &subject, const std::string &signal, const Slot &slot)
virtual void detached (Subject &subject, const std::string &signal, const Slot &slot)

Protected Member Functions

virtual ~Observer ()


Detailed Description

Base class for objects to receive notification of attachment and detachment.

If an object needs to be notified when one of its slot methods is attached or detached from a subject, it needs to derive from Observer and provide implementations of either or both of the attached and detached methods.

See also:
Subject

Definition at line 28 of file Observer.h.


Constructor & Destructor Documentation

virtual Observer::~Observer (  )  [protected, virtual]

This should not be deleted directly.

It should be deleted according to the instructions provided for the relevant subclass.

Definition at line 62 of file Observer.h.


Member Function Documentation

virtual void Observer::attached ( Subject subject,
const std::string &  signal,
const Slot slot 
) [virtual]

Method to call when a subject is attached to an observer.

Parameters:
subject The subject being attached to.
signal The signal being attached to.
slot The slot being attached to.

Definition at line 41 of file Observer.h.

virtual void Observer::detached ( Subject subject,
const std::string &  signal,
const Slot slot 
) [virtual]

Method to call when a subject is detached from an observer.

Parameters:
subject The subject being detached from.
signal The signal being detached from.
slot The slot being detached from.

Definition at line 54 of file Observer.h.


Software Development Kit - Opticks 4.9.0 Build 16218