32 #ifdef NO_SWORD_NAMESPACE
33 #define SWORD_NAMESPACE_START namespace sword {
34 #define SWORD_NAMESPACE_END }; using namespace sword;
35 #elif defined(__cplusplus)
36 #define SWORD_NAMESPACE_START namespace sword {
37 #define SWORD_NAMESPACE_END }
39 #define SWORD_NAMESPACE_START
40 #define SWORD_NAMESPACE_END
47 #define SWDYNAMIC_CAST(className, object) dynamic_cast<className *>(object)
52 #define SWDYNAMIC_CAST(className, object) (className *)((object)?((object->getClass()->isAssignableFrom(#className))?object:0):0)
58 #define SWCATCH(x) catch (x)
62 #define SWCATCH(x) if (0)
63 #define GLOBCONFPATH "/Program Files/sword/sword.conf"
71 #define SWCATCH(x) if (0)
79 # define SWDLLEXPORT _declspec( dllexport )
80 # define SWDLLEXPORT_DATA(type) _declspec( dllexport ) type
81 # define SWDLLEXPORT_CTORFN
82 # elif defined(SWUSINGDLL)
83 # define SWDLLEXPORT _declspec( dllimport )
84 # define SWDLLEXPORT_DATA(type) _declspec( dllimport ) type
85 # define SWDLLEXPORT_CTORFN
88 # define SWDLLEXPORT_DATA(type) type
89 # define SWDLLEXPORT_CTORFN
93 # define SWDEPRECATED __declspec(deprecated("** WARNING: deprecated method **"))
96 #elif defined(__SWPM__)
99 # define SWDLLEXPORT _Export
100 # define SWDLLEXPORT_DATA(type) _Export type
101 # define SWDLLEXPORT_CTORFN
102 # elif defined(SWUSINGDLL)
103 # define SWDLLEXPORT _Export
104 # define SWDLLEXPORT_DATA(type) _Export type
105 # define SWDLLEXPORT_CTORFN
108 # define SWDLLEXPORT_DATA(type) type
109 # define SWDLLEXPORT_CTORFN
112 # define SWDEPRECATED
115 #elif defined(__GNUWIN32__)
118 # define SWDLLEXPORT __declspec( dllexport )
119 # define SWDLLEXPORT_DATA(type) __declspec( dllexport ) type
120 # define SWDLLEXPORT_CTORFN
121 # elif defined(SWUSINGDLL)
122 # define SWDLLEXPORT __declspec( dllimport )
123 # define SWDLLEXPORT_DATA(type) __declspec( dllimport ) type
124 # define SWDLLEXPORT_CTORFN
127 # define SWDLLEXPORT_DATA(type) type
128 # define SWDLLEXPORT_CTORFN
131 # define SWDEPRECATED __attribute__((__deprecated__))
134 #elif defined(__BORLANDC__)
137 # define SWDLLEXPORT _export
138 # define SWDLLEXPORT_DATA(type) __declspec( dllexport ) type
139 # define SWDLLEXPORT_CTORFN
140 # elif defined(SWUSINGDLL)
141 # define SWDLLEXPORT __declspec( dllimport )
142 # define SWDLLEXPORT_DATA(type) __declspec( dllimport ) type
143 # define SWDLLEXPORT_CTORFN
146 # define SWDLLEXPORT_DATA(type) type
147 # define SWDLLEXPORT_CTORFN
151 #define COMMENT SLASH(/)
152 #define SLASH(s) /##s
158 # define SWDEPRECATED
159 #define va_copy(dest, src) (dest = src)
160 #define unorm2_getNFKDInstance(x) unorm2_getInstance(NULL, "nfkc", UNORM2_DECOMPOSE, x)
163 #elif defined(__GNUC__)
165 # define SWDLLEXPORT_DATA(type) type
166 # define SWDLLEXPORT_CTORFN
167 # define SWDEPRECATED __attribute__((__deprecated__))
172 # define SWDLLEXPORT_DATA(type) type
173 # define SWDLLEXPORT_CTORFN
174 # define SWDEPRECATED
179 #if defined(__BORLANDC__) && defined( _RTLDLL )
180 # define SWDLLIMPORT __import
187 #define SWLOGD(...) SWLog::getSystemLog()->logDebug(__VA_ARGS__)
189 #define SWLOGD(...) (void)0
193 #define SWLOGI(...) SWLog::getSystemLog()->logInformation(__VA_ARGS__)
194 #define SWLOGTI(...) SWLog::getSystemLog()->logTimedInformation(__VA_ARGS__)
196 #define SWLOGI(...) (void)0
197 #define SWLOGTI(...) (void)0
201 #define SWLOGD SWLog::getSystemLog()->logDebug
203 #define SWLOGD COMMENT
207 #define SWLOGI SWLog::getSystemLog()->logInformation
208 #define SWLOGTI SWLog::getSystemLog()->logTimedInformation
210 #define SWLOGI COMMENT
211 #define SWLOGTI COMMENT
#define SWORD_NAMESPACE_START
#define SWORD_NAMESPACE_END