Notifier.h 547 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright 2009-2011, Andrea Anzani. All rights reserved.
  3. * Distributed under the terms of the MIT License.
  4. */
  5. #ifndef NOTIFIER_H
  6. #define NOTIFIER_H
  7. #include <String.h>
  8. #include <ObjectList.h>
  9. #include "Observer.h"
  10. class Notifier
  11. {
  12. public:
  13. void RegisterObserver(Observer*);
  14. void UnregisterObserver(Observer*);
  15. void NotifyString(int32 what, BString str);
  16. void NotifyInteger(int32 what, int32 value);
  17. void NotifyPointer(int32 what, void* ptr);
  18. private:
  19. BObjectList<Observer> fObserverList;
  20. };
  21. #endif // NOTIFIER_H