X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FEvents%2FEvents_Loop.h;h=a11426f1b99263f8581a0d4b5640c14db9167bd3;hb=f3f60a3cb69f2534a5837cd249782395e5edb183;hp=b8a628ff7d73a9050e6ab527f5b620d4661ea2ca;hpb=acebef0bc5fb22dc9672e0046085b896e957af56;p=modules%2Fshaper.git diff --git a/src/Events/Events_Loop.h b/src/Events/Events_Loop.h index b8a628ff7..a11426f1b 100644 --- a/src/Events/Events_Loop.h +++ b/src/Events/Events_Loop.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: Events_Loop.hxx // Created: Thu Mar 13 2014 // Author: Mikhail PONIKAROV @@ -14,7 +16,7 @@ class Events_MessageGroup; -/**\class Events_Lopp +/**\class Events_Loop * \ingroup EventsLoop * \brief Base class that manages the receiving and sending of all * not Qt-events in the application. @@ -33,7 +35,7 @@ class Events_Loop std::map myImmediateListeners; /// map from event ID to groupped messages (accumulated on flush) - std::map > myGroups; + std::map > myGroups; ///< set of messages that are flushed right now, so they are not grouped std::set myFlushed; @@ -52,8 +54,9 @@ class Events_Loop EVENTS_EXPORT static Events_ID eventByName(const char* theName); //! Allows to send an event + //! \param theMessage the enevt message to send //! \param isGroup is true for grouping messages if possible - EVENTS_EXPORT void send(const boost::shared_ptr& theMessage, bool isGroup = true); + EVENTS_EXPORT void send(const std::shared_ptr& theMessage, bool isGroup = true); //! Registers (or adds if such listener is already registered) a listener //! that will be called on the event and from the defined sender @@ -72,6 +75,11 @@ class Events_Loop //! Enables flush without grouping for the given message EVENTS_EXPORT void autoFlush(const Events_ID& theID, const bool theAuto = true); + + //! Returns true if the evement is flushed right now + EVENTS_EXPORT bool isFlushed(const Events_ID& theID); + //! Sets the flag that the event is flished right now + EVENTS_EXPORT void setFlushed(const Events_ID& theID, const bool theValue); }; #endif