Lunchbox  1.8.0
types.h
Go to the documentation of this file.
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 
23 #ifndef LUNCHBOX_TYPES_H
24 #define LUNCHBOX_TYPES_H
25 
26 #include <string>
27 #include <vector>
28 #include <sys/types.h>
29 
30 #ifndef _MSC_VER
31 # include <stdint.h>
32 #endif
33 
34 #ifdef _WIN32
35 # include <basetsd.h>
36 
37 typedef int socklen_t;
38 
39 # ifdef _MSC_VER
40 typedef UINT64 uint64_t;
41 typedef INT64 int64_t;
42 typedef UINT32 uint32_t;
43 typedef INT32 int32_t;
44 typedef UINT16 uint16_t;
45 typedef INT16 int16_t;
46 typedef UINT8 uint8_t;
47 typedef INT8 int8_t;
48 # ifndef HAVE_SSIZE_T
49 typedef SSIZE_T ssize_t;
50 # define HAVE_SSIZE_T
51 # endif
52 # endif // Win32, Visual C++
53 #endif // Win32
54 
55 #define LB_BIT1 (0x00000001u)
56 #define LB_BIT2 (0x00000002u)
57 #define LB_BIT3 (0x00000004u)
58 #define LB_BIT4 (0x00000008u)
59 #define LB_BIT5 (0x00000010u)
60 #define LB_BIT6 (0x00000020u)
61 #define LB_BIT7 (0x00000040u)
62 #define LB_BIT8 (0x00000080u)
63 
64 #define LB_BIT9 (0x00000100u)
65 #define LB_BIT10 (0x00000200u)
66 #define LB_BIT11 (0x00000400u)
67 #define LB_BIT12 (0x00000800u)
68 #define LB_BIT13 (0x00001000u)
69 #define LB_BIT14 (0x00002000u)
70 #define LB_BIT15 (0x00004000u)
71 #define LB_BIT16 (0x00008000u)
72 
73 #define LB_BIT17 (0x00010000u)
74 #define LB_BIT18 (0x00020000u)
75 #define LB_BIT19 (0x00040000u)
76 #define LB_BIT20 (0x00080000u)
77 #define LB_BIT21 (0x00100000u)
78 #define LB_BIT22 (0x00200000u)
79 #define LB_BIT23 (0x00400000u)
80 #define LB_BIT24 (0x00800000u)
81 
82 #define LB_BIT25 (0x01000000u)
83 #define LB_BIT26 (0x02000000u)
84 #define LB_BIT27 (0x04000000u)
85 #define LB_BIT28 (0x08000000u)
86 #define LB_BIT29 (0x10000000u)
87 #define LB_BIT30 (0x20000000u)
88 #define LB_BIT31 (0x40000000u)
89 #define LB_BIT32 (0x80000000u)
90 
91 #define LB_BIT33 (0x0000000100000000ull)
92 #define LB_BIT34 (0x0000000200000000ull)
93 #define LB_BIT35 (0x0000000400000000ull)
94 #define LB_BIT36 (0x0000000800000000ull)
95 #define LB_BIT37 (0x0000001000000000ull)
96 #define LB_BIT38 (0x0000002000000000ull)
97 #define LB_BIT39 (0x0000004000000000ull)
98 #define LB_BIT40 (0x0000008000000000ull)
99 
100 #define LB_BIT41 (0x0000010000000000ull)
101 #define LB_BIT42 (0x0000020000000000ull)
102 #define LB_BIT43 (0x0000040000000000ull)
103 #define LB_BIT44 (0x0000080000000000ull)
104 #define LB_BIT45 (0x0000100000000000ull)
105 #define LB_BIT46 (0x0000200000000000ull)
106 #define LB_BIT47 (0x0000400000000000ull)
107 #define LB_BIT48 (0x0000800000000000ull)
108 
109 #define LB_BIT49 (0x0001000000000000ull)
110 #define LB_BIT50 (0x0002000000000000ull)
111 #define LB_BIT51 (0x0004000000000000ull)
112 #define LB_BIT52 (0x0008000000000000ull)
113 #define LB_BIT53 (0x0010000000000000ull)
114 #define LB_BIT54 (0x0020000000000000ull)
115 #define LB_BIT55 (0x0040000000000000ull)
116 #define LB_BIT56 (0x0080000000000000ull)
117 
118 #define LB_BIT57 (0x0100000000000000ull)
119 #define LB_BIT58 (0x0200000000000000ull)
120 #define LB_BIT59 (0x0400000000000000ull)
121 #define LB_BIT60 (0x0800000000000000ull)
122 #define LB_BIT61 (0x1000000000000000ull)
123 #define LB_BIT62 (0x2000000000000000ull)
124 #define LB_BIT63 (0x4000000000000000ull)
125 #define LB_BIT64 (0x8000000000000000ull)
126 
127 #define LB_BIT_ALL_32 (0xffffffffu)
128 #define LB_BIT_ALL_64 (0xffffffffffffffffull)
129 #define LB_BIT_NONE (0)
130 
131 #define LB_1KB (1024)
132 #define LB_10KB (10240)
133 #define LB_100KB (102400)
134 #define LB_1MB (1048576)
135 #define LB_10MB (10485760)
136 #define LB_100MB (104857600)
137 
138 #define LB_16KB (16384)
139 #define LB_32KB (32768)
140 #define LB_64KB (65536)
141 #define LB_128KB (131072)
142 #define LB_48MB (50331648)
143 #define LB_64MB (67108864)
144 
146 struct EqCompressorInfo;
147 typedef std::vector< EqCompressorInfo > EqCompressorInfos;
148 typedef EqCompressorInfos::const_iterator EqCompressorInfosCIter;
149 struct GLEWContextStruct;
150 struct WGLEWContextStruct;
151 typedef struct GLEWContextStruct GLEWContext;
152 typedef struct WGLEWContextStruct WGLEWContext;
155 namespace lunchbox
156 {
158 typedef std::vector< std::string > Strings;
159 typedef Strings::const_iterator StringsCIter;
160 
161 class Clock;
162 class Lock;
163 class NonCopyable;
164 class Plugin;
165 class PluginRegistry;
166 class Referenced;
167 class RequestHandler;
168 class Servus;
169 class SpinLock;
170 class UUID;
171 class Uploader;
172 class uint128_t;
173 
174 template< class > class Atomic;
175 template< class > class Buffer;
176 template< class > class Monitor;
177 template< class, class > class LFVectorIterator;
178 template< class, class > class PluginVisitorT;
179 template< class, class > class Lockable;
180 template< class, int32_t > class LFVector;
181 
185 
186 typedef std::vector< Plugin* > Plugins;
187 typedef Plugins::const_iterator PluginsCIter;
188 
190 typedef PluginVisitorT< const Plugin,
192 
194 struct CompressorInfo;
195 typedef std::vector< CompressorInfo > CompressorInfos;
196 typedef CompressorInfos::const_iterator CompressorInfosCIter;
197 typedef CompressorInfos::iterator CompressorInfosIter;
199 }
200 
201 #endif //LUNCHBOX_TYPES_H