#ifndef __GLOBAL_DEFINES_H__
#define __GLOBAL_DEFINES_H__

#if defined(WIN32)
#ifdef USE_OTX_DLLS
#define OTX_API __declspec(dllimport)
#else
#define OTX_API __declspec(dllexport)
#endif
#elif defined(__linux__) || defined(__MACH__)
#define OTX_API

#define INFINITE_NUM 0xFFFFFF
#else
#pragma message("Compiling OTX core or pluging: OS Not supported!")
#endif

#if defined(WIN32)
#ifndef USE_OTX_DLLS
#pragma warning(disable : 4786 4250 4251 4275 4103)
#endif

// this macro formats a message to appear in the Visual Studio task list as a
// warning, which allows to navigate to the file and line context. usage
// example: #pragma warn_me ("don't forget to adapt this section")
#ifndef warn_me
#define __MAKE_STR__(x) #x
#define __STR__(x) __MAKE_STR__(x)
#define warn_me(x) message(__FILE__ "(" __STR__(__LINE__) ") : warning: " #x)
#endif
#endif

#define MAX_A_UINT16 65535
#define MAX_A_UINT32 0xFFFFFFFF

// in debug mode, do not catch win32 structured exception
//
// Win32 structured exception, e.g. access violation exception
// are caught by catch (...) in with Visual C++ .NET 2003.
// In debug mode, win32 structured exception should not be caught.
#ifdef _DEBUG
#define CATCH_DDD catch (std::exception &)
#else
#define CATCH_DDD catch (...)
#endif

#define EXC_CONTEXT __FILE__, __LINE__, __FUNCTION__

static const bool BOOL_TRUE(true);
static const bool BOOL_FALSE(false);

#endif // __GLOBAL_DEFINES_H__
