Equalizer  1.9.0
Parallel Rendering Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
messagePump.h
1 
2 /* Copyright (c) 2007-2013, Stefan Eilemann <eile@equalizergraphics.com>
3  *
4  * This library is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License version 2.1 as published
6  * by the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11  * details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  */
17 
18 #ifndef EQ_MESSAGEPUMP_H
19 #define EQ_MESSAGEPUMP_H
20 
21 #include <eq/api.h>
22 #include <eq/types.h>
23 
24 namespace eq
25 {
28 {
29 public:
32 
34  virtual ~MessagePump() {}
35 
37  virtual void postWakeup() = 0;
38 
40  virtual void dispatchAll() = 0;
41 
47  virtual void dispatchOne( const uint32_t timeout =
48  LB_TIMEOUT_INDEFINITE ) = 0;
49 
51  virtual void register_( dc::Proxy* )
52  { LBWARN << "Missing message pump for Deflect" << std::endl; }
53 
55  virtual void deregister( dc::Proxy* ) { /*Not implemented*/ }
56 };
57 }
58 
59 #endif //EQ_MESSAGEPUMP_H
Defines export visibility macros for Equalizer.
virtual void register_(dc::Proxy *)
Register a new DC connection for event dispatch.
Definition: messagePump.h:51
virtual void postWakeup()=0
Unblock dispatchOne().
virtual void dispatchOne(const uint32_t timeout=LB_TIMEOUT_INDEFINITE)=0
Dispatch at least one pending system event, blocks potentially.
An interface to process system messages or events.
Definition: messagePump.h:27
virtual void deregister(dc::Proxy *)
Deregister a DC connection from event dispatch.
Definition: messagePump.h:55
virtual ~MessagePump()
Destruct this message pump.
Definition: messagePump.h:34
virtual void dispatchAll()=0
Dispatch all pending system events, does not block.
MessagePump()
Construct a new message pump.
Definition: messagePump.h:31