libvisiontransfer  8.1.0
common.h
1 /*******************************************************************************
2  * Copyright (c) 2020 Nerian Vision GmbH
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *******************************************************************************/
14 
15 #ifndef VISIONTRANSFER_COMMON_H
16 #define VISIONTRANSFER_COMMON_H
17 
18 #ifdef _MSC_VER
19  // Visual studio needs an explicit export statement
20 # define VT_EXPORT __declspec(dllexport)
21 #else
22 # define VT_EXPORT
23 #endif
24 
25 // Macro for marking functions / variables as deprecated
26 #ifdef VISIONTRANSFER_NO_DEPRECATION_WARNINGS
27  // For referencing all of our own code (e.g. for Python wrapper)
28 # define DEPRECATED(msg)
29 #else
30 # if __cplusplus >= 201402L
31 # define DEPRECATED(msg) [[deprecated(msg)]]
32 # elif defined(__GNUC__) || defined(__clang__)
33 # define DEPRECATED(msg) __attribute__ ((deprecated(msg)))
34 # elif defined(_MSC_VER)
35 # define DEPRECATED(msg) __declspec(deprecated(msg))
36 # else
37 # define DEPRECATED(msg)
38 # endif
39 #endif
40 
41 #endif
Nerian Vision Technologies