+
+void Events_Loop::flush(const Events_ID& theID)
+{
+ if (!myFlushActive)
+ return;
+ std::map<char*, std::shared_ptr<Events_Message>>::iterator aMyGroup =
+ myGroups.find(theID.eventText());
+ if (aMyGroup != myGroups.end()) { // really sends
+ myFlushed.insert(theID.myID);
+ std::shared_ptr<Events_Message> aGroup = aMyGroup->second;
+ myGroups.erase(aMyGroup);
+ send(aGroup, false);
+ myFlushed.erase(myFlushed.find(theID.myID));
+ }
+}
+
+void Events_Loop::activateFlushes(const bool theActivate)
+{
+ myFlushActive = theActivate;
+}
+
+void Events_Loop::clear(const Events_ID& theID)
+{
+ std::map<char*, std::shared_ptr<Events_Message>>::iterator aMyGroup =
+ myGroups.find(theID.eventText());
+ if (aMyGroup != myGroups.end()) { // really sends
+ myGroups.erase(aMyGroup);
+ }
+}
+
+void Events_Loop::autoFlush(const Events_ID& theID, const bool theAuto)
+{
+ if (theAuto)
+ myFlushed.insert(theID.myID);
+ else
+ myFlushed.erase(myFlushed.find(theID.myID));
+}