LCOV - code coverage report
Current view: top level - eq - messagePump.h (source / functions) Hit Total Coverage
Test: Equalizer Lines: 2 6 33.3 %
Date: 2017-12-16 05:07:20 Functions: 2 5 40.0 %

          Line data    Source code
       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             : {
      26             : /** An interface to process system messages or events. */
      27             : class MessagePump
      28             : {
      29             : public:
      30             :     /** Construct a new message pump. @version 1.0 */
      31           2 :     MessagePump() {}
      32             :     /** Destruct this message pump. @version 1.0 */
      33           2 :     virtual ~MessagePump() {}
      34             :     /** Unblock dispatchOne(). @version 1.0 */
      35             :     virtual void postWakeup() = 0;
      36             : 
      37             :     /** Dispatch all pending system events, does not block. @version 1.0 */
      38             :     virtual void dispatchAll() = 0;
      39             : 
      40             :     /**
      41             :      * Dispatch at least one pending system event, blocks potentially.
      42             :      * @param timeout the time to wait for an event
      43             :      * @version 1.0
      44             :      */
      45             :     virtual void dispatchOne(
      46             :         const uint32_t timeout = LB_TIMEOUT_INDEFINITE) = 0;
      47             : 
      48             :     /** Register a new Deflect connection for event dispatch. @version 1.7.1 */
      49           0 :     virtual void register_(deflect::Proxy*)
      50             :     {
      51           0 :         LBWARN << "Missing message pump for Deflect" << std::endl;
      52           0 :     }
      53             : 
      54             :     /** Deregister a Deflect connection from event dispatch. @version 1.7.1 */
      55           0 :     virtual void deregister(deflect::Proxy*) { /*Not implemented*/}
      56             : };
      57             : }
      58             : 
      59             : #endif // EQ_MESSAGEPUMP_H

Generated by: LCOV version 1.11