A reusable typesafe observer implementation

Wikman, Johan

A reusable typesafe observer implementation

This implementation is almost identical to the non-parameterized version. The only difference is that the type of the argument for the member function u pd a t e is now specified using the template parameter. Consequently, a concrete observer will always be delivered to a concrete subject.' The Observer template cannot, of course, be used as such, but must be derived from, as in a non-template version. When the Ob server template has been implemented, it is clear how the Subject template should look.


SYSTEMS DEVELOPMENT
GUIDELINES
CODE REUSE
OBJECT ORIENTED PROGRAMMING

H004.415 JOU