20#ifndef INCLUDED_COMPHELPER_ASYNCNOTIFICATION_HXX
21#define INCLUDED_COMPHELPER_ASYNCNOTIFICATION_HXX
71 virtual void SAL_CALL
acquire() noexcept = 0;
72 virtual
void SAL_CALL release() noexcept = 0;
81 struct EventNotifierImpl;
109 SAL_DLLPRIVATE
virtual void execute();
122 virtual void SAL_CALL terminate();
135 void addEvent(
const AnyEventRef& _rEvent, const ::rtl::Reference< IEventProcessor >& _xProcessor );
139 void removeEventsForProcessor( const ::rtl::Reference< IEventProcessor >& _xProcessor );
153 SAL_DLLPRIVATE
virtual void execute()
override;
163 virtual void SAL_CALL terminate()
override;
171 ,
private osl::Thread
177 SAL_DLLPRIVATE
virtual void SAL_CALL
run()
override;
178 SAL_DLLPRIVATE
virtual void SAL_CALL onTerminated()
override;
184 static std::shared_ptr<AsyncEventNotifierAutoJoin>
185 newAsyncEventNotifierAutoJoin(
char const*
name);
187 virtual void SAL_CALL terminate()
override;
189 using osl::Thread::join;
190 using osl::Thread::operator
new;
191 using osl::Thread::operator
delete;
193 static void launch(std::shared_ptr<AsyncEventNotifierAutoJoin>
const&);
201 template <
typename EVENT_OBJECT >
212 :m_aEvent(
std::move( _aEvent ))
the very basic instance to hold a description of an event
AnyEvent(AnyEvent const &)=delete
AnyEvent & operator=(AnyEvent const &)=delete
This is a hack (when proper joining is not possible), use of which should be avoided by good design.
a helper class for notifying events asynchronously
std::unique_ptr< EventNotifierImpl > m_xImpl
This class is usable with rtl::Reference.
AnyEvent derivee holding a foreign event instance.
const EventObjectType & getEventObject() const
EventHolder(EventObjectType _aEvent)
EVENT_OBJECT EventObjectType
EventObjectType const m_aEvent
virtual void SAL_CALL acquire() noexcept=0
virtual void processEvent(const AnyEvent &_rEvent)=0
process a single event
#define COMPHELPER_DLLPUBLIC
def run(arg=None, arg2=-1)
void JoinAsyncEventNotifiers()
::rtl::Reference< AnyEvent > AnyEventRef