35 #include <ogdf/basic/internal/config_autogen.h> 39 #if defined(OGDF_DEBUG) && defined(NDEBUG) 40 # error "Contradicting configuration: Macros OGDF_DEBUG and NDEBUG are defined." 51 #if defined(unix) || defined(__unix__) || defined(__unix) || defined(_AIX) || defined(__APPLE__) 52 #define OGDF_SYSTEM_UNIX 55 #if defined(__WIN32__) || defined(_WIN32) || defined(__NT__) 56 #define OGDF_SYSTEM_WINDOWS 60 #if defined(__APPLE__) 61 #define OGDF_SYSTEM_OSX 66 #if __cplusplus < 201103 70 #error "Compiling OGDF requires Visual C++ 11 (Visual Studio 2012) or higher!" 73 #elif defined(__GNUC__) 74 #ifndef __GXX_EXPERIMENTAL_CXX0X__ 75 #error "No C++11 support activated for g++ (compile with -std=c++0x or -std=c++11)!" 79 #error "Compiling OGDF requires a C++11 compliant compiler!" 84 #ifdef __has_cpp_attribute 85 # define OGDF_HAS_CPP_ATTRIBUTE(x) (__has_cpp_attribute(x) && __cplusplus >= __has_cpp_attribute(x)) 87 # define OGDF_HAS_CPP_ATTRIBUTE(x) 0 101 #ifdef OGDF_SYSTEM_WINDOWS 105 # define OGDF_EXPORT __declspec(dllexport) 107 # define OGDF_EXPORT __declspec(dllimport) 118 #define OGDF_DEPRECATED(reason) 120 #if OGDF_HAS_CPP_ATTRIBUTE(deprecated) 121 # undef OGDF_DEPRECATED 122 # define OGDF_DEPRECATED(reason) [[deprecated(reason)]] 123 #elif defined(_MSC_VER) 124 # undef OGDF_DEPRECATED 125 # define OGDF_DEPRECATED(reason) __declspec(deprecated(reason)) 126 #elif defined(__GNUC__) 127 # undef OGDF_DEPRECATED 128 # define OGDF_DEPRECATED(reason) __attribute__((deprecated(reason))) 141 #define OGDF_LIKELY(x) (x) 148 #define OGDF_UNLIKELY(x) (x) 152 #define OGDF_DECL_ALIGN(b) 154 #ifdef _MSC_VER // Visual C++ compiler 155 # undef OGDF_DECL_ALIGN 156 # define OGDF_DECL_ALIGN(b) __declspec(align(b)) 157 #elif defined(__GNUC__) // GNU gcc compiler (also Intel compiler) 159 # define OGDF_LIKELY(x) __builtin_expect((x),1) 160 # undef OGDF_UNLIKELY 161 # define OGDF_UNLIKELY(x) __builtin_expect((x),0) 162 # undef OGDF_DECL_ALIGN 163 # define OGDF_DECL_ALIGN(b) __attribute__ ((aligned(b))) 169 #define OGDF_CASE_FALLTHROUGH 170 #if OGDF_HAS_CPP_ATTRIBUTE(fallthrough) 171 # undef OGDF_CASE_FALLTHROUGH 172 # define OGDF_CASE_FALLTHROUGH [[fallthrough]] 173 #elif defined(__GNUC__) && __GNUC__ >= 7 174 # undef OGDF_CASE_FALLTHROUGH 175 # define OGDF_CASE_FALLTHROUGH __attribute__((fallthrough)) 187 #pragma warning(disable : 4251) 189 #pragma warning(disable : 4275) 193 #pragma warning (disable : 4355) 232 #ifdef OGDF_SYSTEM_WINDOWS 233 return System::Windows;
234 #elif defined(OGDF_SYSTEM_OSX) 236 #elif defined(OGDF_SYSTEM_UNIX) 249 static constexpr
bool haveLPSolver() {
255 #if defined(COIN_OSI_CLP) 256 return LPSolver::Clp;
257 #elif defined(COIN_OSI_SYM) 258 return LPSolver::Symphony;
259 #elif defined(COIN_OSI_CPX) 260 return LPSolver::CPLEX;
261 #elif defined(COIN_OSI_GRB) 262 return LPSolver::Gurobi;
264 # error "OGDF is compiled without LP solver. Check your build configuration." 276 static constexpr
bool haveCoin() {
288 static constexpr
bool haveAbacus() {
302 #if defined(OGDF_MEMORY_POOL_TS) 303 return MemoryManager::PoolTS;
304 #elif defined(OGDF_MEMORY_POOL_NTS) 305 return MemoryManager::PoolNTS;
306 #elif defined(OGDF_MEMORY_MALLOC_TS) 307 return MemoryManager::Malloc;
309 # error "OGDF is compiled without memory manager. Check your build configuration." static constexpr MemoryManager whichMemoryManager()
Returns the memory manager used by OGDF.
string toString(FromClass key)
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Provides information about how OGDF has been configured.
static constexpr System whichSystem()
Returns the operating system for which OGDF has been configured.
static const string & toString(System sys)
Converts sys to a (readable) string.
LPSolver
Specifies the LP-solver used by OGDF.
MemoryManager
Specifies the memory-manager used by OGDF.
Two geometric objects do not intersect.
static constexpr LPSolver whichLPSolver()
Returns the LP-solver used by OGDF.
#define OGDF_DEPRECATED(reason)
Mark a class / member / function as deprecated.
System
Specifies the operating system for which OGDF has been configured/built.
The namespace for all OGDF objects.
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.