LCOV - code coverage report
Current view: top level - eq/fabric - event.h (source / functions) Hit Total Coverage
Test: Equalizer Lines: 4 5 80.0 %
Date: 2017-12-16 05:07:20 Functions: 1 2 50.0 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2006-2017, Stefan Eilemann <eile@equalizergraphics.com>
       3             :  *                          Cedric Stalder <cedric.stalder@gmail.com>
       4             :  *                          Daniel Nachbaur <danielnachbaur@gmail.com>
       5             :  *
       6             :  * This library is free software; you can redistribute it and/or modify it under
       7             :  * the terms of the GNU Lesser General Public License version 2.1 as published
       8             :  * by the Free Software Foundation.
       9             :  *
      10             :  * This library is distributed in the hope that it will be useful, but WITHOUT
      11             :  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
      12             :  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
      13             :  * details.
      14             :  *
      15             :  * You should have received a copy of the GNU Lesser General Public License
      16             :  * along with this library; if not, write to the Free Software Foundation, Inc.,
      17             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      18             :  */
      19             : 
      20             : #ifndef EQFABRIC_EVENT_H
      21             : #define EQFABRIC_EVENT_H
      22             : 
      23             : #include <eq/fabric/types.h>
      24             : #include <lunchbox/bitOperation.h>
      25             : 
      26             : namespace eq
      27             : {
      28             : namespace fabric
      29             : {
      30             : /**
      31             :  * Base event structure to report window system and other events.
      32             :  *
      33             :  * The originator typically contains the co::Object identifier of the entity
      34             :  * emitting the event.
      35             :  */
      36           0 : struct Event
      37             : {
      38          49 :     Event()
      39          49 :         : serial(0)
      40          49 :         , time(0)
      41             :     {
      42          49 :     }
      43             : 
      44             :     uint32_t serial;      //!< unique originator serial number
      45             :     int64_t time;         //!< The config time when the event was created
      46             :     uint128_t originator; //!< The identifier of the entity emitting the event
      47             : };
      48             : 
      49             : /** Print the event to the given output stream. @version 1.0 */
      50             : inline std::ostream& operator<<(std::ostream& os, const Event& event)
      51             : {
      52             :     return os << event.originator;
      53             : }
      54             : }
      55             : }
      56             : 
      57             : #endif // EQFABRIC_EVENT_H

Generated by: LCOV version 1.11