GLStats  0.3.3
item.h
1 
2 /* Copyright (c) 2012, Stefan Eilemann <eile@eyescale.ch>
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 GLSTATS_ITEM_H
19 #define GLSTATS_ITEM_H
20 
21 #include <GLStats/api.h>
22 #include <iostream>
23 
24 namespace GLStats
25 {
27 struct Item
28 {
29  Item()
30  : start(-1)
31  , end(-1)
32  , type(0)
33  , entity(0)
34  , thread(0)
35  , frame(0)
36  , layer(0)
37  {
38  }
39 
40  uint64_t start;
41  uint64_t end;
42  uint32_t type;
43  uint32_t entity;
44  uint32_t thread;
45  uint32_t frame;
46  uint32_t layer;
47  std::string text;
48 };
49 
50 inline std::ostream& operator<<(std::ostream& os, const Item& item)
51 {
52  return os << item.entity << '.' << item.thread << "@ " << item.frame << "("
53  << item.start << '-' << item.end << "):" << item.type;
54 }
55 }
56 
57 #endif // GLSTATS_ITEM_H
uint64_t start
Beginning of the event.
Definition: item.h:40
Defines export visibility macros for library GLStats.
std::string text
Optional string at the end of the item.
Definition: item.h:47
uint32_t frame
The rendering frame number.
Definition: item.h:45
uint64_t end
End of the event.
Definition: item.h:41
uint32_t entity
Identifier of the reporting entity.
Definition: item.h:43
Basic type definitions not provided by the operating system.
Definition: data.h:24
One statistics item.
Definition: item.h:27
uint32_t thread
Identifier of the reporting thread.
Definition: item.h:44
uint32_t type
Event type.
Definition: item.h:42
uint32_t layer
Depth of a (sub-)event.
Definition: item.h:46