Salome HOME
Sources formated according to the codeing standards
[modules/shaper.git] / src / Events / Events_MessageGroup.h
1 // File:        Events_MessageGroup.hxx
2 // Created:     Thu Mar 13 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef Events_MessageGroup_H_
6 #define Events_MessageGroup_H_
7
8 #include <Events_Message.h>
9
10 /**\class Events_Message
11  * \ingroup EventsLoop
12  * \brief Message that allows to group messages and send them later as a group of messages.
13  *
14  * Loop detects such messages and accumulates them without sending. On "flush" loop sends it
15  * as a group-message.
16  */
17 class EVENTS_EXPORT Events_MessageGroup : public Events_Message
18 {
19
20  public:
21
22   //! Creates the message
23   Events_MessageGroup(const Events_ID theID, const void* theSender = 0)
24       : Events_Message(theID, theSender)
25   {
26   }
27   //! do nothing in the destructor yet
28   virtual ~Events_MessageGroup()
29   {
30   }
31
32   //! Creates a new empty group (to store it in the loop before flush)
33   virtual Events_MessageGroup* newEmpty() = 0;
34   //! Allows to join the given message with the current one
35   virtual void Join(Events_MessageGroup& theJoined) = 0;
36 };
37
38 #endif