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) // member is not dllexport 42 #pragma warning(disable : 4267) // conversion from 'size_t' to 'type', possible loss of data 43 #pragma warning(disable : 4275) // base class is not dllexport 44 #pragma warning(disable : 4244) // conversion to (or from) smaller integer type 45 #pragma warning(disable : 4355) //'this' pointer used in initializer list 46 #pragma warning(disable : 4800) // non-bool value coerced into bool (e.g. bool a = 5;) 47 #pragma warning(disable : 4503) // decorated name too long, truncated 48 #pragma warning(disable : 4344) // template specialisation results in different function being 54 #if defined(DLL_TULIP) || defined(DLL_TULIP_GL) || defined(DLL_TULIP_QT) || defined(DLL_TULIP_QT2) 55 #pragma warning(disable : 4996) // deprecated functions 58 #define _DEPRECATED __declspec(deprecated) 59 #define _DEPRECATED_TYPEDEF(type, deprecated_type) typedef _DEPRECATED type deprecated_type 61 #define __PRETTY_FUNCTION__ __FUNCTION__ // MSVC has a different name for pretty_function 62 #define strcasecmp stricmp // strcasecmp does not exists for VC, workaround 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) {
119 #else // _MSC_VER < 1800 124 #endif // _MSC_VER < 1800 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 184 #ifdef DLL_TULIP_OGDF 185 #define TLP_OGDF_SCOPE __declspec(dllexport) 187 #define TLP_OGDF_SCOPE __declspec(dllimport) 190 #ifndef TLP_OGDF_SCOPE 191 #define TLP_OGDF_SCOPE 201 extern TLP_SCOPE std::ostream &debug();
206 extern TLP_SCOPE
void setDebugOutput(std::ostream &os);
211 extern TLP_SCOPE std::ostream &warning();
216 extern TLP_SCOPE
void setWarningOutput(std::ostream &os);
221 extern TLP_SCOPE std::ostream &error();
226 extern TLP_SCOPE
void setErrorOutput(std::ostream &os);
232 extern TLP_SCOPE std::string getTulipVersion();
235 #endif // TULIPCONF_H