Version: 0.6.0
wxfreechartdefs.h
1 // Name: wxfreechartdefs.h
3 // Purpose: base declarations
4 // Author: Moskvichev Andrey V.
5 // Created: 2008/11/07
6 // Copyright: (c) 2008-2010 Moskvichev Andrey V.
7 // Licence: wxWidgets licence
9 
10 #ifndef WXFREECHARTDEFS_H
11 #define WXFREECHARTDEFS_H
12 
13 #include <wx/wxprec.h>
14 
15 #ifdef __BORLANDC__
16  #pragma hdrstop
17 #endif
18 
19 #ifndef WX_PRECOMP
20  #include <wx/wx.h>
21 #endif
22 
23 // dll impexp macros. Thanks to Mike Sazonov
24 #ifdef WXMAKINGDLL_FREECHART
25 #define WXDLLIMPEXP_FREECHART WXEXPORT
26 #define WXDLLIMPEXP_DATA_FREECHART(type) WXEXPORT type
27 #elif defined(WXUSINGDLL) && !defined(_LOCAL_)
28 #define WXDLLIMPEXP_FREECHART WXIMPORT
29 #define WXDLLIMPEXP_DATA_FREECHART(type) WXIMPORT type
30 #else // not making nor using DLL
31 #define WXDLLIMPEXP_FREECHART
32 #define WXDLLIMPEXP_DATA_FREECHART(type) type
33 #endif
34 
35 #ifndef ABS
36 #define ABS(a) ((a) < 0) ? (-1*(a)) : (a)
37 #endif //ABS
38 
39 #define wxREPLACE(dst, src) do { \
40  wxDELETE(dst); \
41  dst = src; \
42 } while (0)
43 
44 
45 inline static int RoundHigh(double value)
46 {
47  int iv = (int) value;
48 
49  if (((double) iv) > value)
50  iv++;
51  return iv;
52 }
53 
54 #endif /* WXFREECHARTDEFS_H */