systemMacro.h
Go to the documentation of this file.
1 #pragma once
2 
8 //PLEASE INCLUDE THIS FILE ON ANY ANNWVYN HEADER
9 
10 /*This file contains macros and symbols definition that have to be
11  * parsed by pre-compiler on each file.
12  */
13 
14 //AnnDllExport management for visual studio compiler.
15 #ifdef _WIN32
16 #ifdef DLLDIR_EX //Defined in Annwvyn MSVC project file only \
17 #define AnnDllExport __declspec(dllexport) // export AnnDllExport information
19 #else
20 #define AnnDllExport __declspec(dllimport) // import AnnDllExport information
22 #endif
23 #else
24 #define AnnDllExport
25 #endif
26 
27 //DO NOT FORGET TO CALL THE AnnDllExport MACRO AT ANY CLASS AND GLOBAL FUNCTION DECLARATION!
28 //e.g. class AnnDllExport SomeClass {};
29 
30 //Thanks to http://stackoverflow.com/a/21265197 for this convenient macro
31 #ifdef __GNUC__
32 #define DEPRECATED __attribute__((deprecated("This method as been flagged as DEPRECATED. Please check Annwvyn's class header for replacement")))
34 #elif defined(_MSC_VER)
35 #define DEPRECATED __declspec(deprecated("This method as been flagged as DEPRECATED. Please check Annwvyn's class header for replacement"))
37 #else
38 #pragma message("WARNING: You need to implement DEPRECATED for this compiler")
39 #define DEPRECATED
41 #endif