system.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-2015 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef _GAZEBO_VISIBLE_HH_
18 #define _GAZEBO_VISIBLE_HH_
19 
22 
25 
26 #if defined BUILDING_STATIC_LIBS
27  #define GAZEBO_VISIBLE
28  #define GZ_COMMON_VISIBLE
29  #define GZ_MATH_VISIBLE
30  #define GZ_TRANSPORT_VISIBLE
31  #define GZ_MSGS_VISIBLE
32  #define GZ_SELECTION_BUFF_VISIBLE
33  #define GZ_RENDERING_VISIBLE
34  #define GZ_UTIL_VISIBLE
35  #define GZ_PLUGIN_VISIBLE
36  #define GZ_RENDERING_DEFERRED_VISIBLE
37  #define GZ_PHYSICS_VISIBLE
38  #define GZ_PHYSICS_ODE_VISIBLE
39  #define GZ_GUI_VISIBLE
40  #define GZ_GUI_BUILDING_VISIBLE
41  #define GZ_GUI_MODEL_VISIBLE
42  #define GZ_GUI_TERRAIN_VISIBLE
43  #define GZ_GUI_VIEWERS_VISIBLE
44  #define GAZEBO_HIDDEN
45 #else
46  #if defined _WIN32 || defined __CYGWIN__
47  #ifdef BUILDING_DLL
48  #ifdef __GNUC__
49  #define GAZEBO_VISIBLE __attribute__ ((dllexport))
50  #else
51  #define GAZEBO_VISIBLE __declspec(dllexport)
52  #endif
53  #else
54  #ifdef __GNUC__
55  #define GAZEBO_VISIBLE __attribute__ ((dllimport))
56  #else
57  #define GAZEBO_VISIBLE __declspec(dllimport)
58  #endif
59  #endif
60  #define GAZEBO_HIDDEN
61  #else
62  #if __GNUC__ >= 4
63  #define GAZEBO_VISIBLE __attribute__ ((visibility ("default")))
64  #define GAZEBO_HIDDEN __attribute__ ((visibility ("hidden")))
65  #else
66  #define GAZEBO_VISIBLE
67  #define GAZEBO_HIDDEN
68  #endif
69  #endif
70 
71  #if defined _WIN32 || defined __CYGWIN__
72  #ifdef BUILDING_DLL_GZ_COMMON
73  #ifdef __GNUC__
74  #define GZ_COMMON_VISIBLE __attribute__ ((dllexport))
75  #else
76  #define GZ_COMMON_VISIBLE __declspec(dllexport)
77  #endif
78  #else
79  #ifdef __GNUC__
80  #define GZ_COMMON_VISIBLE __attribute__ ((dllimport))
81  #else
82  #define GZ_COMMON_VISIBLE __declspec(dllimport)
83  #endif
84  #endif
85  #define GZ_COMMON_HIDDEN
86  #else
87  #if __GNUC__ >= 4
88  #define GZ_COMMON_VISIBLE __attribute__ ((visibility ("default")))
89  #define GZ_COMMON_HIDDEN __attribute__ ((visibility ("hidden")))
90  #else
91  #define GZ_COMMON_VISIBLE
92  #define GZ_COMMON_HIDDEN
93  #endif
94  #endif
95 
96  #if defined _WIN32 || defined __CYGWIN__
97  #ifdef BUILDING_DLL_GZ_PLUGIN
98  #ifdef __GNUC__
99  #define GZ_PLUGIN_VISIBLE __attribute__ ((dllexport))
100  #else
101  #define GZ_PLUGIN_VISIBLE __declspec(dllexport)
102  #endif
103  #else
104  #ifdef __GNUC__
105  #define GZ_PLUGIN_VISIBLE __attribute__ ((dllimport))
106  #else
107  #define GZ_PLUGIN_VISIBLE __declspec(dllimport)
108  #endif
109  #endif
110  #define GZ_PLUGIN_HIDDEN
111  #else
112  #if __GNUC__ >= 4
113  #define GZ_PLUGIN_VISIBLE __attribute__ ((visibility ("default")))
114  #define GZ_PLUGIN_HIDDEN __attribute__ ((visibility ("hidden")))
115  #else
116  #define GZ_PLUGIN_VISIBLE
117  #define GZ_PLUGIN_HIDDEN
118  #endif
119  #endif
120 
121  #if defined _WIN32 || defined __CYGWIN__
122  #ifdef BUILDING_DLL_GZ_MATH
123  #ifdef __GNUC__
124  #define GZ_MATH_VISIBLE __attribute__ ((dllexport))
125  #else
126  #define GZ_MATH_VISIBLE __declspec(dllexport)
127  #endif
128  #else
129  #ifdef __GNUC__
130  #define GZ_MATH_VISIBLE __attribute__ ((dllimport))
131  #else
132  #define GZ_MATH_VISIBLE __declspec(dllimport)
133  #endif
134  #endif
135  #define GZ_MATH_HIDDEN
136  #else
137  #if __GNUC__ >= 4
138  #define GZ_MATH_VISIBLE __attribute__ ((visibility ("default")))
139  #define GZ_MATH_HIDDEN __attribute__ ((visibility ("hidden")))
140  #else
141  #define GZ_MATH_VISIBLE
142  #define GZ_MATH_HIDDEN
143  #endif
144  #endif
145 
146  #if defined _WIN32 || defined __CYGWIN__
147  #ifdef BUILDING_DLL_GZ_TRANSPORT
148  #ifdef __GNUC__
149  #define GZ_TRANSPORT_VISIBLE __attribute__ ((dllexport))
150  #else
151  #define GZ_TRANSPORT_VISIBLE __declspec(dllexport)
152  #endif
153  #else
154  #ifdef __GNUC__
155  #define GZ_TRANSPORT_VISIBLE __attribute__ ((dllimport))
156  #else
157  #define GZ_TRANSPORT_VISIBLE __declspec(dllimport)
158  #endif
159  #endif
160  #define GZ_TRANSPORT_HIDDEN
161  #else
162  #if __GNUC__ >= 4
163  #define GZ_TRANSPORT_VISIBLE __attribute__ ((visibility ("default")))
164  #define GZ_TRANSPORT_HIDDEN __attribute__ ((visibility ("hidden")))
165  #else
166  #define GZ_TRANSPORT_VISIBLE
167  #define GZ_TRANSPORT_HIDDEN
168  #endif
169  #endif
170 
171  #if defined _WIN32 || defined __CYGWIN__
172  #ifdef BUILDING_DLL_GZ_MSGS
173  #ifdef __GNUC__
174  #define GZ_MSGS_VISIBLE __attribute__ ((dllexport))
175  #else
176  #define GZ_MSGS_VISIBLE __declspec(dllexport)
177  #endif
178  #else
179  #ifdef __GNUC__
180  #define GZ_MSGS_VISIBLE __attribute__ ((dllimport))
181  #else
182  #define GZ_MSGS_VISIBLE __declspec(dllimport)
183  #endif
184  #endif
185  #define GZ_MSGS_HIDDEN
186  #else
187  #if __GNUC__ >= 4
188  #define GZ_MSGS_VISIBLE __attribute__ ((visibility ("default")))
189  #define GZ_MSGS_HIDDEN __attribute__ ((visibility ("hidden")))
190  #else
191  #define GZ_MSGS_VISIBLE
192  #define GZ_MSGS_HIDDEN
193  #endif
194  #endif
195 
196  #if defined _WIN32 || defined __CYGWIN__
197  #ifdef BUILDING_DLL_GZ_SELECTION_BUFF
198  #ifdef __GNUC__
199  #define GZ_SELECTION_BUFF_VISIBLE __attribute__ ((dllexport))
200  #else
201  #define GZ_SELECTION_BUFF_VISIBLE __declspec(dllexport)
202  #endif
203  #else
204  #ifdef __GNUC__
205  #define GZ_SELECTION_BUFF_VISIBLE __attribute__ ((dllimport))
206  #else
207  #define GZ_SELECTION_BUFF_VISIBLE __declspec(dllimport)
208  #endif
209  #endif
210  #define GZ_SELECTION_BUFF_HIDDEN
211  #else
212  #if __GNUC__ >= 4
213  #define GZ_SELECTION_BUFF_VISIBLE __attribute__ ((visibility ("default")))
214  #define GZ_SELECTION_BUFF_HIDDEN __attribute__ ((visibility ("hidden")))
215  #else
216  #define GZ_SELECTION_BUFF_VISIBLE
217  #define GZ_SELECTION_BUFF_HIDDEN
218  #endif
219  #endif
220 
221  #if defined _WIN32 || defined __CYGWIN__
222  #ifdef BUILDING_DLL_GZ_RENDERING
223  #ifdef __GNUC__
224  #define GZ_RENDERING_VISIBLE __attribute__ ((dllexport))
225  #else
226  #define GZ_RENDERING_VISIBLE __declspec(dllexport)
227  #endif
228  #else
229  #ifdef __GNUC__
230  #define GZ_RENDERING_VISIBLE __attribute__ ((dllimport))
231  #else
232  #define GZ_RENDERING_VISIBLE __declspec(dllimport)
233  #endif
234  #endif
235  #define GZ_RENDERING_HIDDEN
236  #else
237  #if __GNUC__ >= 4
238  #define GZ_RENDERING_VISIBLE __attribute__ ((visibility ("default")))
239  #define GZ_RENDERING_HIDDEN __attribute__ ((visibility ("hidden")))
240  #else
241  #define GZ_RENDERING_VISIBLE
242  #define GZ_RENDERING_HIDDEN
243  #endif
244  #endif
245 
246  #if defined _WIN32 || defined __CYGWIN__
247  #ifdef BUILDING_DLL_GZ_UTIL
248  #ifdef __GNUC__
249  #define GZ_UTIL_VISIBLE __attribute__ ((dllexport))
250  #else
251  #define GZ_UTIL_VISIBLE __declspec(dllexport)
252  #endif
253  #else
254  #ifdef __GNUC__
255  #define GZ_UTIL_VISIBLE __attribute__ ((dllimport))
256  #else
257  #define GZ_UTIL_VISIBLE __declspec(dllimport)
258  #endif
259  #endif
260  #define GZ_UTIL_HIDDEN
261  #else
262  #if __GNUC__ >= 4
263  #define GZ_UTIL_VISIBLE __attribute__ ((visibility ("default")))
264  #define GZ_UTIL_HIDDEN __attribute__ ((visibility ("hidden")))
265  #else
266  #define GZ_UTIL_VISIBLE
267  #define GZ_UTIL_HIDDEN
268  #endif
269  #endif
270 
271  #if defined _WIN32 || defined __CYGWIN__
272  #ifdef BUILDING_DLL_GZ_RENDERING_DEFERRED
273  #ifdef __GNUC__
274  #define GZ_RENDERING_DEFERRED_VISIBLE __attribute__ ((dllexport))
275  #else
276  #define GZ_RENDERING_DEFERRED_VISIBLE __declspec(dllexport)
277  #endif
278  #else
279  #ifdef __GNUC__
280  #define GZ_RENDERING_DEFERRED_VISIBLE __attribute__ ((dllimport))
281  #else
282  #define GZ_RENDERING_DEFERRED_VISIBLE __declspec(dllimport)
283  #endif
284  #endif
285  #define GZ_RENDERING_DEFERRED_HIDDEN
286  #else
287  #if __GNUC__ >= 4
288  #define GZ_RENDERING_DEFERRED_VISIBLE __attribute__ ((visibility (\
289  "default")))
290  #define GZ_RENDERING_DEFERRED_HIDDEN __attribute__ ((visibility (\
291  "hidden")))
292  #else
293  #define GZ_RENDERING_DEFERRED_VISIBLE
294  #define GZ_RENDERING_DEFERRED_HIDDEN
295  #endif
296  #endif
297 
298  #if defined _WIN32 || defined __CYGWIN__
299  #ifdef BUILDING_DLL_GZ_PHYSICS
300  #ifdef __GNUC__
301  #define GZ_PHYSICS_VISIBLE __attribute__ ((dllexport))
302  #else
303  #define GZ_PHYSICS_VISIBLE __declspec(dllexport)
304  #endif
305  #else
306  #ifdef __GNUC__
307  #define GZ_PHYSICS_VISIBLE __attribute__ ((dllimport))
308  #else
309  #define GZ_PHYSICS_VISIBLE __declspec(dllimport)
310  #endif
311  #endif
312  #define GZ_PHYSICS_HIDDEN
313  #else
314  #if __GNUC__ >= 4
315  #define GZ_PHYSICS_VISIBLE __attribute__ ((visibility ("default")))
316  #define GZ_PHYSICS_HIDDEN __attribute__ ((visibility ("hidden")))
317  #else
318  #define GZ_PHYSICS_VISIBLE
319  #define GZ_PHYSICS_HIDDEN
320  #endif
321  #endif
322 
323  #if defined _WIN32 || defined __CYGWIN__
324  #ifdef BUILDING_DLL_GZ_PHYSICS_ODE
325  #ifdef __GNUC__
326  #define GZ_PHYSICS_ODE_VISIBLE __attribute__ ((dllexport))
327  #else
328  #define GZ_PHYSICS_ODE_VISIBLE __declspec(dllexport)
329  #endif
330  #else
331  #ifdef __GNUC__
332  #define GZ_PHYSICS_ODE_VISIBLE __attribute__ ((dllimport))
333  #else
334  #define GZ_PHYSICS_ODE_VISIBLE __declspec(dllimport)
335  #endif
336  #endif
337  #define GZ_PHYSICS_ODE_HIDDEN
338  #else
339  #if __GNUC__ >= 4
340  #define GZ_PHYSICS_ODE_VISIBLE __attribute__ ((visibility ("default")))
341  #define GZ_PHYSICS_ODE_HIDDEN __attribute__ ((visibility ("hidden")))
342  #else
343  #define GZ_PHYSICS_ODE_VISIBLE
344  #define GZ_PHYSICS_ODE_HIDDEN
345  #endif
346  #endif
347 
348  #if defined _WIN32 || defined __CYGWIN__
349  #ifdef BUILDING_DLL_GZ_GUI
350  #ifdef __GNUC__
351  #define GZ_GUI_VISIBLE __attribute__ ((dllexport))
352  #else
353  #define GZ_GUI_VISIBLE __declspec(dllexport)
354  #endif
355  #else
356  #ifdef __GNUC__
357  #define GZ_GUI_VISIBLE __attribute__ ((dllimport))
358  #else
359  #define GZ_GUI_VISIBLE __declspec(dllimport)
360  #endif
361  #endif
362  #define GZ_GUI_HIDDEN
363  #else
364  #if __GNUC__ >= 4
365  #define GZ_GUI_VISIBLE __attribute__ ((visibility ("default")))
366  #define GZ_GUI_HIDDEN __attribute__ ((visibility ("hidden")))
367  #else
368  #define GZ_GUI_VISIBLE
369  #define GZ_GUI_HIDDEN
370  #endif
371  #endif
372 
373  #if defined _WIN32 || defined __CYGWIN__
374  #ifdef BUILDING_DLL_GZ_GUI_BUILDING
375  #ifdef __GNUC__
376  #define GZ_GUI_BUILDING_VISIBLE __attribute__ ((dllexport))
377  #else
378  #define GZ_GUI_BUILDING_VISIBLE __declspec(dllexport)
379  #endif
380  #else
381  #ifdef __GNUC__
382  #define GZ_GUI_BUILDING_VISIBLE __attribute__ ((dllimport))
383  #else
384  #define GZ_GUI_BUILDING_VISIBLE __declspec(dllimport)
385  #endif
386  #endif
387  #define GZ_GUI_BUILDING_HIDDEN
388  #else
389  #if __GNUC__ >= 4
390  #define GZ_GUI_BUILDING_VISIBLE __attribute__ ((visibility ("default")))
391  #define GZ_GUI_BUILDING_HIDDEN __attribute__ ((visibility ("hidden")))
392  #else
393  #define GZ_GUI_BUILDING_VISIBLE
394  #define GZ_GUI_BUILDING_HIDDEN
395  #endif
396  #endif
397 
398  #if defined _WIN32 || defined __CYGWIN__
399  #ifdef BUILDING_DLL_GZ_GUI_MODEL
400  #ifdef __GNUC__
401  #define GZ_GUI_MODEL_VISIBLE __attribute__ ((dllexport))
402  #else
403  #define GZ_GUI_MODEL_VISIBLE __declspec(dllexport)
404  #endif
405  #else
406  #ifdef __GNUC__
407  #define GZ_GUI_MODEL_VISIBLE __attribute__ ((dllimport))
408  #else
409  #define GZ_GUI_MODEL_VISIBLE __declspec(dllimport)
410  #endif
411  #endif
412  #define GZ_GUI_MODEL_HIDDEN
413  #else
414  #if __GNUC__ >= 4
415  #define GZ_GUI_MODEL_VISIBLE __attribute__ ((visibility ("default")))
416  #define GZ_GUI_MODEL_HIDDEN __attribute__ ((visibility ("hidden")))
417  #else
418  #define GZ_GUI_MODEL_VISIBLE
419  #define GZ_GUI_MODEL_HIDDEN
420  #endif
421  #endif
422 
423  #if defined _WIN32 || defined __CYGWIN__
424  #ifdef BUILDING_DLL_GZ_GUI_TERRAIN
425  #ifdef __GNUC__
426  #define GZ_GUI_TERRAIN_VISIBLE __attribute__ ((dllexport))
427  #else
428  #define GZ_GUI_TERRAIN_VISIBLE __declspec(dllexport)
429  #endif
430  #else
431  #ifdef __GNUC__
432  #define GZ_GUI_TERRAIN_VISIBLE __attribute__ ((dllimport))
433  #else
434  #define GZ_GUI_TERRAIN_VISIBLE __declspec(dllimport)
435  #endif
436  #endif
437  #define GZ_GUI_TERRAIN_HIDDEN
438  #else
439  #if __GNUC__ >= 4
440  #define GZ_GUI_TERRAIN_VISIBLE __attribute__ ((visibility ("default")))
441  #define GZ_GUI_TERRAIN_HIDDEN __attribute__ ((visibility ("hidden")))
442  #else
443  #define GZ_GUI_TERRAIN_VISIBLE
444  #define GZ_GUI_TERRAIN_HIDDEN
445  #endif
446  #endif
447 
448  #if defined _WIN32 || defined __CYGWIN__
449  #ifdef BUILDING_DLL_GZ_GUI_VIEWERS
450  #ifdef __GNUC__
451  #define GZ_GUI_VIEWERS_VISIBLE __attribute__ ((dllexport))
452  #else
453  #define GZ_GUI_VIEWERS_VISIBLE __declspec(dllexport)
454  #endif
455  #else
456  #ifdef __GNUC__
457  #define GZ_GUI_VIEWERS_VISIBLE __attribute__ ((dllimport))
458  #else
459  #define GZ_GUI_VIEWERS_VISIBLE __declspec(dllimport)
460  #endif
461  #endif
462  #define GZ_GUI_VIEWERS_HIDDEN
463  #else
464  #if __GNUC__ >= 4
465  #define GZ_GUI_VIEWERS_VISIBLE __attribute__ ((visibility ("default")))
466  #define GZ_GUI_VIEWERS_HIDDEN __attribute__ ((visibility ("hidden")))
467  #else
468  #define GZ_GUI_VIEWERS_VISIBLE
469  #define GZ_GUI_VIEWERS_HIDDEN
470  #endif
471  #endif
472 // BUILDING_STATIC_LIBS
473 #endif
474 
475 // _GAZEBO_VISIBLE_HH_
476 #endif