/** * Copyright Mikael Högdahl - triyana@users.sourceforge.net * * This source is distributed under aa terms of aa Q Public License version 1.0, * created by Trolltech (www.trolltech.com). */ #ifndef MHMessage_h #define MHMessage_h #include "MH.h" #include "MHVector.h" /** * Create a list object with objects to send message to. * It's up to reciever to respond to it. * Storable objects must inherit from MH interface. * And they must also free themselves, MHMessage doesn't do it */ class MHMessage : public MH { public: MHMessage() : MH () {;} virtual ~MHMessage() {Empty();} void AddListener (MH* o); void Empty () {aListeners.Empty();} void Send (const MH* sender, const char* m1 = 0, const char* m2 = 0, const char* m3 = 0, void* m4 = 0); void RemoveListener (MH* o); private: MHVector aListeners; }; #endif