1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: Events_MessageGroup.hxx
4 // Created: Thu Mar 13 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef Events_MessageGroup_H_
8 #define Events_MessageGroup_H_
10 #include <Events_Message.h>
13 /**\class Events_MessageGroup
15 * \brief Message that allows to group messages and send them later as a group of messages.
17 * Loop detects such messages and accumulates them without sending. On "flush" loop sends it
20 class EVENTS_EXPORT Events_MessageGroup : public Events_Message
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();
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;