monitoring v1.0.0
Loading...
Searching...
No Matches
visibility_control.hpp
Go to the documentation of this file.
1// Copyright Institute for Automotive Engineering (ika), RWTH Aachen University
2// SPDX-License-Identifier: Apache-2.0
3
4/*
5 * Export macros to control symbol visibility on different platforms.
6 */
7
8#ifndef RVIZ_PLUGINS__VISIBILITY_CONTROL_HPP_
9#define RVIZ_PLUGINS__VISIBILITY_CONTROL_HPP_
10
11// Borrowed from standard ROS 2 visibility control patterns.
12#if defined _WIN32 || defined __CYGWIN__
13#ifdef __GNUC__
14#define RVIZ_PLUGINS_EXPORT __attribute__((dllexport))
15#define RVIZ_PLUGINS_IMPORT __attribute__((dllimport))
16#else
17#define RVIZ_PLUGINS_EXPORT __declspec(dllexport)
18#define RVIZ_PLUGINS_IMPORT __declspec(dllimport)
19#endif
20#ifdef RVIZ_PLUGINS_BUILDING_LIBRARY
21#define RVIZ_PLUGINS_PUBLIC RVIZ_PLUGINS_EXPORT
22#else
23#define RVIZ_PLUGINS_PUBLIC RVIZ_PLUGINS_IMPORT
24#endif
25#define RVIZ_PLUGINS_PUBLIC_TYPE RVIZ_PLUGINS_PUBLIC
26#define RVIZ_PLUGINS_LOCAL
27#else
28#define RVIZ_PLUGINS_EXPORT __attribute__((visibility("default")))
29#define RVIZ_PLUGINS_IMPORT
30#if __GNUC__ >= 4
31#define RVIZ_PLUGINS_PUBLIC __attribute__((visibility("default")))
32#define RVIZ_PLUGINS_LOCAL __attribute__((visibility("hidden")))
33#else
34#define RVIZ_PLUGINS_PUBLIC
35#define RVIZ_PLUGINS_LOCAL
36#endif
37#define RVIZ_PLUGINS_PUBLIC_TYPE
38#endif
39
40#endif // RVIZ_PLUGINS__VISIBILITY_CONTROL_HPP_