32 #ifndef LUNCHBOX_TYPES_H
33 #define LUNCHBOX_TYPES_H
39 #include <sys/types.h>
48 typedef int socklen_t;
51 typedef UINT64 uint64_t;
52 typedef INT64 int64_t;
53 typedef UINT32 uint32_t;
54 typedef INT32 int32_t;
55 typedef UINT16 uint16_t;
56 typedef INT16 int16_t;
57 typedef UINT8 uint8_t;
60 typedef SSIZE_T ssize_t;
63 # endif // Win32, Visual C++
67 #define LB_UNDEFINED_UINT16 (0xffffu)
70 #define LB_UNDEFINED_UINT32 (0xffffffffu)
73 #define LB_UNDEFINED_UINT64 (0xffffffffffffffffull)
76 #define LB_MAX_UINT32 (0xfffffff0u)
79 #define LB_TIMEOUT_INDEFINITE 0xffffffffu // Attn: identical to Win32 INFINITE!
82 #define LB_TIMEOUT_DEFAULT 0xfffffffeu
86 #define LB_MAX(a,b) ((a)>(b)?(a):(b))
87 #define LB_MIN(a,b) ((a)<(b)?(a):(b))
89 #define LB_BIT1 (0x00000001u)
90 #define LB_BIT2 (0x00000002u)
91 #define LB_BIT3 (0x00000004u)
92 #define LB_BIT4 (0x00000008u)
93 #define LB_BIT5 (0x00000010u)
94 #define LB_BIT6 (0x00000020u)
95 #define LB_BIT7 (0x00000040u)
96 #define LB_BIT8 (0x00000080u)
98 #define LB_BIT9 (0x00000100u)
99 #define LB_BIT10 (0x00000200u)
100 #define LB_BIT11 (0x00000400u)
101 #define LB_BIT12 (0x00000800u)
102 #define LB_BIT13 (0x00001000u)
103 #define LB_BIT14 (0x00002000u)
104 #define LB_BIT15 (0x00004000u)
105 #define LB_BIT16 (0x00008000u)
107 #define LB_BIT17 (0x00010000u)
108 #define LB_BIT18 (0x00020000u)
109 #define LB_BIT19 (0x00040000u)
110 #define LB_BIT20 (0x00080000u)
111 #define LB_BIT21 (0x00100000u)
112 #define LB_BIT22 (0x00200000u)
113 #define LB_BIT23 (0x00400000u)
114 #define LB_BIT24 (0x00800000u)
116 #define LB_BIT25 (0x01000000u)
117 #define LB_BIT26 (0x02000000u)
118 #define LB_BIT27 (0x04000000u)
119 #define LB_BIT28 (0x08000000u)
120 #define LB_BIT29 (0x10000000u)
121 #define LB_BIT30 (0x20000000u)
122 #define LB_BIT31 (0x40000000u)
123 #define LB_BIT32 (0x80000000u)
125 #define LB_BIT33 (0x0000000100000000ull)
126 #define LB_BIT34 (0x0000000200000000ull)
127 #define LB_BIT35 (0x0000000400000000ull)
128 #define LB_BIT36 (0x0000000800000000ull)
129 #define LB_BIT37 (0x0000001000000000ull)
130 #define LB_BIT38 (0x0000002000000000ull)
131 #define LB_BIT39 (0x0000004000000000ull)
132 #define LB_BIT40 (0x0000008000000000ull)
134 #define LB_BIT41 (0x0000010000000000ull)
135 #define LB_BIT42 (0x0000020000000000ull)
136 #define LB_BIT43 (0x0000040000000000ull)
137 #define LB_BIT44 (0x0000080000000000ull)
138 #define LB_BIT45 (0x0000100000000000ull)
139 #define LB_BIT46 (0x0000200000000000ull)
140 #define LB_BIT47 (0x0000400000000000ull)
141 #define LB_BIT48 (0x0000800000000000ull)
143 #define LB_BIT49 (0x0001000000000000ull)
144 #define LB_BIT50 (0x0002000000000000ull)
145 #define LB_BIT51 (0x0004000000000000ull)
146 #define LB_BIT52 (0x0008000000000000ull)
147 #define LB_BIT53 (0x0010000000000000ull)
148 #define LB_BIT54 (0x0020000000000000ull)
149 #define LB_BIT55 (0x0040000000000000ull)
150 #define LB_BIT56 (0x0080000000000000ull)
152 #define LB_BIT57 (0x0100000000000000ull)
153 #define LB_BIT58 (0x0200000000000000ull)
154 #define LB_BIT59 (0x0400000000000000ull)
155 #define LB_BIT60 (0x0800000000000000ull)
156 #define LB_BIT61 (0x1000000000000000ull)
157 #define LB_BIT62 (0x2000000000000000ull)
158 #define LB_BIT63 (0x4000000000000000ull)
159 #define LB_BIT64 (0x8000000000000000ull)
161 #define LB_BIT_ALL_32 (0xffffffffu)
162 #define LB_BIT_ALL_64 (0xffffffffffffffffull)
163 #define LB_BIT_NONE (0)
165 #define LB_1KB (1024)
166 #define LB_10KB (10240)
167 #define LB_100KB (102400)
168 #define LB_1MB (1048576)
169 #define LB_10MB (10485760)
170 #define LB_100MB (104857600)
171 #define LB_1GB (1073741824)
173 #define LB_2KB (2048)
174 #define LB_4KB (4096)
175 #define LB_8KB (8192)
176 #define LB_16KB (16384)
177 #define LB_32KB (32768)
178 #define LB_64KB (65536)
179 #define LB_128KB (131072)
180 #define LB_256KB (262144)
181 #define LB_512KB (524288)
182 #define LB_2MB (2097152)
183 #define LB_4MB (4194304)
184 #define LB_8MB (8388608)
185 #define LB_16MB (16777216)
186 #define LB_32MB (33554432)
187 #define LB_48MB (50331648)
188 #define LB_64MB (67108864)
189 #define LB_128MB (134217728)
190 #define LB_256MB (268435456)
191 #define LB_512MB (536870912)
194 struct GLEWContextStruct;
195 struct WGLEWContextStruct;
196 typedef struct GLEWContextStruct GLEWContext;
197 typedef struct WGLEWContextStruct WGLEWContext;
198 #define LB_DLLEXPORT LUNCHBOX_DLLEXPORT
199 #define LB_DLLIMPORT LUNCHBOX_DLLIMPORT
202 #ifdef LUNCHBOX_USE_V1_API
215 typedef Strings::const_iterator StringsCIter;
216 typedef Strings::iterator StringsIter;
226 template<
class >
class Array;
227 template<
class >
class Atomic;
228 template<
class >
class Buffer;
229 template<
class >
class Future;
230 template<
class >
class Monitor;
231 template<
class >
class Request;
233 template<
class,
class >
class Lockable;
234 template<
class,
class >
class Plugin;
247 typedef std::vector< DSO* > DSOs;
249 #ifdef LUNCHBOX_USE_V1_API
250 using servus::Servus;
251 using servus::uint128_t;
254 typedef servus::uint128_t UUID;
258 #endif //LUNCHBOX_TYPES_H
A wrapper for C arrays without any memory management.
Helper to access dynamic shared objects (DSO)
An iterator for LFVector.
Future< void > f_void_t
A future signed size promise.
A variable with atomic semantics and standalone atomic operations.
A fast lock for uncontended memory access.
A class for time measurements.
STL-like vector implementation providing certain thread-safety guarantees.
std::vector< std::string > Strings
A vector of std::strings.
Future< uint32_t > f_uint32_t
A future 32 bit unsigned promise.
Future template specialization for void.
Factory for Plugin classes.
A convenience structure to hold data together with a lock for access.
A Future implementation for a RequestHandler request.
Includes compile-time defines of Lunchbox.
Buffer< uint8_t > Bufferb
a byte buffer
Base class to make objects non-copyable.
A future represents a asynchronous operation.
Atomic< int32_t > a_int32_t
An atomic 32 bit integer variable.
Future< ssize_t > f_ssize_t
A future signed size promise.
Base class for referenced objects.
Atomic< ssize_t > a_ssize_t
An atomic signed size variable.
Abstraction layer and common utilities for multi-threaded programming.
Manages a class deriving from a PluginT interface.
A thread-safe request handler.
A lock (mutex) primitive.
A simple memory buffer with some helper functions.
Future< bool > f_bool_t
A boolean future.