1 // ==========================================================================
2 //                 SeqAn - The Library for Sequence Analysis
3 // ==========================================================================
4 // Copyright (c) 2006-2018, Knut Reinert, FU Berlin
5 // All rights reserved.
6 //
7 // Redistribution and use in source and binary forms, with or without
8 // modification, are permitted provided that the following conditions are met:
9 //
10 //     * Redistributions of source code must retain the above copyright
11 //       notice, this list of conditions and the following disclaimer.
12 //     * Redistributions in binary form must reproduce the above copyright
13 //       notice, this list of conditions and the following disclaimer in the
14 //       documentation and/or other materials provided with the distribution.
15 //     * Neither the name of Knut Reinert or the FU Berlin nor the names of
16 //       its contributors may be used to endorse or promote products derived
17 //       from this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 // ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
23 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
29 // DAMAGE.
30 //
31 // ==========================================================================
32 // Author: Manuel Holtgrewe <manuel.holtgrewe@fu-berlin.de>
33 // ==========================================================================
34 // Macro for deprecating code.
35 // ==========================================================================
36 
37 #ifndef INCLUDE_SEQAN_BASIC_MACRO_DEPRECATED_H_
38 #define INCLUDE_SEQAN_BASIC_MACRO_DEPRECATED_H_
39 
40 namespace seqan {
41 
42 // ============================================================================
43 // Macros
44 // ============================================================================
45 
46 // Macros SEQAN_DEPRECATED_PRE SEQAN_DEPRECATED_POST
47 //
48 // For internal use only.
49 //
50 // For cross-platform compatibility, you can use this in declarations only.
51 // We need a version that comes before and one that comes after the symbol
52 // because of cross-compiler compatibility.
53 //
54 // Example:
55 //
56 // void
57 // SEQAN_DEPRECATED_PRE("Use bar instead.")
58 // f()
59 // SEQAN_DEPRECATED_POST("Use bar instead.");
60 
61 #if defined(__clang__)
62 #define SEQAN_DEPRECATED_PRE(msg)
63 #define SEQAN_DEPRECATED_POST(msg) __attribute__((deprecated(msg)))
64 #elif defined(__GNUC__)
65 #define SEQAN_DEPRECATED_PRE(msg)
66 #define SEQAN_DEPRECATED_POST(msg) __attribute__((__deprecated__))
67 #elif defined(_MSC_VER)
68 #define SEQAN_DEPRECATED_PRE(msg) __declspec(deprecated(msg))
69 #define SEQAN_DEPRECATED_POST(msg)
70 #else
71 #pragma message("WARNING: You need to implement DEPRECATED_PRE and DEPRECATED_POST for this compiler")
72 #define SEQAN_DEPRECATED_PRE(func)
73 #define SEQAN_DEPRECATED_POST(func)
74 #endif
75 
76 }  // namespace seqan
77 
78 #endif  // #ifndef INCLUDE_SEQAN_BASIC_MACRO_DEPRECATED_H_
79