Design Pattern Examples
Overview of object-oriented design patterns
INumberProducer Interface Reference

Represents the Subject to the observers. This is the minimum needed by observers to get access to the data provided by the Subject class. More...

Inheritance diagram for INumberProducer:
Inheritance graph
Collaboration diagram for INumberProducer:
Collaboration graph

Public Member Functions

uint FetchNumber ()
 Return the current value from the Subject.
 

Detailed Description

Represents the Subject to the observers. This is the minimum needed by observers to get access to the data provided by the Subject class.

An interface is used to represent the Subject to the observers so the observers do not have too much knowledge about the Subject, allowing more freedom to change the Subject class implementation without affecting observers. This interface would naturally have to change if the observers needed more data from the Subject.

Definition at line 84 of file ObserverSubject_NumberProducer.cs.

Member Function Documentation

◆ FetchNumber()

uint FetchNumber ( )

Return the current value from the Subject.

Returns
Returns an unsigned integer that is the current value.

Implemented in ObserverSubject_NumberProducer.

Referenced by ObserverForDecimal.NumberChanged(), ObserverForHexaDecimal.NumberChanged(), and ObserverForBinary.NumberChanged().


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