32 #define STRINGIFY(PARAM) STRINGIFY_INTERNAL(PARAM)
33 #define STRINGIFY_INTERNAL(PARAM) #PARAM
36 typedef unsigned int uint;
37 typedef unsigned char uchar;
41 #pragma warning(disable : 4251)
42 #pragma warning(disable : 4267)
43 #pragma warning(disable : 4275)
44 #pragma warning(disable : 4244)
45 #pragma warning(disable : 4355)
46 #pragma warning(disable : 4800)
47 #pragma warning(disable : 4503)
48 #pragma warning(disable : 4344)
54 #if defined(DLL_TULIP) || defined(DLL_TULIP_GL) || defined(DLL_TULIP_QT) || defined(DLL_TULIP_QT2)
55 #pragma warning(disable : 4996)
58 #define _DEPRECATED __declspec(deprecated)
59 #define _DEPRECATED_TYPEDEF(type, deprecated_type) typedef _DEPRECATED type deprecated_type
61 #define __PRETTY_FUNCTION__ __FUNCTION__
62 #define strcasecmp stricmp
66 inline double fabs(
int i) {
67 return std::fabs(
double(i));
77 inline double sqrt(
int i) {
78 return std::sqrt(
double(i));
81 inline double sqrt(
unsigned int i) {
82 return std::sqrt(
double(i));
85 inline double log(
int i) {
86 return std::log(
double(i));
89 inline double log(
unsigned int i) {
90 return std::log(
double(i));
93 inline double floor(
int i) {
94 return std::floor(
double(i));
97 inline double floor(
unsigned int i) {
98 return std::floor(
double(i));
101 inline double round(
double d) {
102 return std::floor(d + 0.5);
105 inline float strtof(
const char *cptr,
char **endptr) {
106 return std::strtod(cptr, endptr);
110 #define isnan(x) ((x) != (x))
111 #define rint(arg) arg > 0 ? int(std::floor(double(arg))) : int(std::ceil(double(arg)))
114 inline double log1p(
double x) {
129 #define _DEPRECATED __attribute__((deprecated))
130 #define _DEPRECATED_TYPEDEF(type, deprecated_type) typedef type deprecated_type _DEPRECATED
134 #define _DEPRECATED __attribute__((deprecated))
135 #define _DEPRECATED_TYPEDEF(type, deprecated_type) typedef type deprecated_type _DEPRECATED
141 #define TLP_SCOPE __declspec(dllexport)
143 #define TLP_SCOPE __declspec(dllimport)
152 #define TLP_GL_SCOPE __declspec(dllexport)
154 #define TLP_GL_SCOPE __declspec(dllimport)
163 #define TLP_QT_SCOPE __declspec(dllexport)
165 #define TLP_QT_SCOPE __declspec(dllimport)
173 #ifdef DLL_TULIP_PYTHON
174 #define TLP_PYTHON_SCOPE __declspec(dllexport)
176 #define TLP_PYTHON_SCOPE __declspec(dllimport)
179 #ifndef TLP_PYTHON_SCOPE
180 #define TLP_PYTHON_SCOPE
190 extern TLP_SCOPE std::ostream &debug();
195 extern TLP_SCOPE
void setDebugOutput(std::ostream &os);
200 extern TLP_SCOPE std::ostream &warning();
205 extern TLP_SCOPE
void setWarningOutput(std::ostream &os);
210 extern TLP_SCOPE
void enableWarningOutput(
bool);
215 extern TLP_SCOPE
bool isWarningOutputEnabled();
220 extern TLP_SCOPE std::ostream &error();
225 extern TLP_SCOPE
void setErrorOutput(std::ostream &os);
231 extern TLP_SCOPE std::string getTulipVersion();