1// vi:set ft=cpp: -*- Mode: C++ -*- 2/* 3 * (c) 2010 Alexander Warg <warg@os.inf.tu-dresden.de> 4 * economic rights: Technische Universität Dresden (Germany) 5 * 6 * This file is part of TUD:OS and distributed under the terms of the 7 * GNU General Public License 2. 8 * Please see the COPYING-GPL-2 file for details. 9 */ 10#pragma once 11 12#include <l4/cxx/hlist> 13 14namespace cxx { 15 16class Observer : public H_list_item 17{ 18public: 19 virtual void notify() = 0; 20}; 21 22class Notifier : public H_list<Observer> 23{ 24public: 25 void notify() 26 { 27 for (Iterator i = begin(); i != end(); ++i) 28 i->notify(); 29 } 30}; 31 32} 33 34 35