TPIE

2362a60
deprecated.h
Go to the documentation of this file.
1 // -*- mode: c++; tab-width: 4; indent-tabs-mode: t; c-file-style: "stroustrup"; -*-
2 // vi:set ts=4 sts=4 sw=4 noet :
3 // Copyright 2012, The TPIE development team
4 //
5 // This file is part of TPIE.
6 //
7 // TPIE is free software: you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License as published by the
9 // Free Software Foundation, either version 3 of the License, or (at your
10 // option) any later version.
11 //
12 // TPIE is distributed in the hope that it will be useful, but WITHOUT ANY
13 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 // License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with TPIE. If not, see <http://www.gnu.org/licenses/>
19 
23 
24 #ifndef __TPIE_DEPRECATED_H__
25 #define __TPIE_DEPRECATED_H__
26 
27 // The config knows whether or not to use deprecation warnings
28 #include <tpie/config.h>
29 
30 #ifdef TPIE_DEPRECATED_WARNINGS
31 #ifdef __GNUC__
32 #define TPIE_DEPRECATED(func) func __attribute__ ((deprecated))
33 #define TPIE_DEPRECATED_CLASS_B
34 #define TPIE_DEPRECATED_CLASS_C __attribute__ ((deprecated))
35 #elif defined(_MSC_VER)
36 #define TPIE_DEPRECATED(func) __declspec(deprecated) func
37 #define TPIE_DEPRECATED_CLASS_B __declspec(deprecated)
38 #define TPIE_DEPRECATED_CLASS_C
39 #else
40 #define TPIE_DEPRECATED(func) func
41 #define TPIE_DEPRECATED_CLASS_B
42 #define TPIE_DEPRECATED_CLASS_C
43 #endif
44 #else
45 #define TPIE_DEPRECATED(func) func
46 #define TPIE_DEPRECATED_CLASS_B
47 #define TPIE_DEPRECATED_CLASS_C
48 #endif
49 
50 #define TPIE_DEPRECATED_CLASS_A(func) func TPIE_DEPRECATED_CLASS_C
51 
52 #endif // __TPIE_DEPRECATED_H__