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