Equalizer  2.0.0
Parallel Rendering Framework
event.h
1 
2 /* Copyright (c) 2006-2016, 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 {
36 struct Event
37 {
38  Event() : serial(0), time(0) {}
39 
40  uint32_t serial;
41  int64_t time;
42  uint128_t originator;
43 };
44 
46 inline std::ostream& operator << ( std::ostream& os, const Event& event )
47  { return os << event.originator; }
48 }
49 }
50 
51 namespace lunchbox
52 {
53 template<> inline void byteswap( eq::fabric::Event& value )
54 {
55  byteswap( value.serial );
56  byteswap( value.time );
57  byteswap( value.originator );
58 }
59 }
60 
61 #endif // EQFABRIC_EVENT_H
Base event structure to report window system and other events.
Definition: event.h:36
uint32_t serial
unique originator serial number
Definition: event.h:40
The Equalizer client library.
Definition: eq/agl/types.h:23
int64_t time
The config time when the event was created.
Definition: event.h:41
std::ostream & operator<<(std::ostream &os, const AxisEvent &event)
Print the axis event to the given output stream.
Definition: axisEvent.h:42
uint128_t originator
The identifier of the entity emitting the event.
Definition: event.h:42