1 // File: Events_MessageGroup.hxx
2 // Created: Thu Mar 13 2014
3 // Author: Mikhail PONIKAROV
5 #ifndef Events_MessageGroup_HeaderFile
6 #define Events_MessageGroup_HeaderFile
8 #include <Events_Message.h>
10 /**\class Events_Message
12 * \brief Message that allows to group messages and send them later as a group of messages.
14 * Loop detects such messages and accumulates them without sending. On "flush" loop sends it
17 class EVENTS_EXPORT Events_MessageGroup : public Events_Message {
21 //! Creates the message
22 Events_MessageGroup(const Events_ID theID, const void* theSender = 0)
23 : Events_Message(theID, theSender) {}
24 //! do nothing in the destructor yet
25 virtual ~Events_MessageGroup() {}
27 //! Creates a new empty group (to store it in the loop before flush)
28 virtual Events_MessageGroup* newEmpty() = 0;
29 //! Allows to join the given message with the current one
30 virtual void Join(Events_MessageGroup& theJoined) = 0;