35 #include <ogdf/basic/internal/config_autogen.h> 57 #if defined(unix) || defined(__unix__) || defined(__unix) || defined(_AIX) || defined(__APPLE__) 58 #define OGDF_SYSTEM_UNIX 61 #if defined(__WIN32__) || defined(_WIN32) || defined(__NT__) 62 #define OGDF_SYSTEM_WINDOWS 66 #if defined(__APPLE__) 67 #define OGDF_SYSTEM_OSX 72 #if __cplusplus < 201103 76 #error "Compiling OGDF requires Visual C++ 11 (Visual Studio 2012) or higher!" 79 #elif defined(__GNUC__) 80 #ifndef __GXX_EXPERIMENTAL_CXX0X__ 81 #error "No C++11 support activated for g++ (compile with -std=c++0x or -std=c++11)!" 85 #error "Compiling OGDF requires a C++11 compliant compiler!" 101 #ifdef OGDF_SYSTEM_WINDOWS 105 # define OGDF_EXPORT __declspec(dllexport) 107 # define OGDF_EXPORT __declspec(dllimport) 118 #define OGDF_DEPRECATED(reason) 120 #if __cplusplus >= 201402L 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))) 177 #pragma warning(disable : 4251) 179 #pragma warning(disable : 4275) 183 #pragma warning (disable : 4355) 222 #ifdef OGDF_SYSTEM_WINDOWS 223 return System::Windows;
224 #elif defined(OGDF_SYSTEM_OSX) 226 #elif defined(OGDF_SYSTEM_UNIX) 239 static constexpr
bool haveLPSolver() {
245 #if defined(COIN_OSI_CLP) 246 return LPSolver::Clp;
247 #elif defined(COIN_OSI_SYM) 248 return LPSolver::Symphony;
249 #elif defined(COIN_OSI_CPX) 250 return LPSolver::CPLEX;
251 #elif defined(COIN_OSI_GRB) 252 return LPSolver::Gurobi;
254 # error "OGDF is compiled without LP solver. Check your build configuration." 266 static constexpr
bool haveCoin() {
278 static constexpr
bool haveAbacus() {
292 #if defined(OGDF_MEMORY_POOL_TS) 293 return MemoryManager::PoolTS;
294 #elif defined(OGDF_MEMORY_POOL_NTS) 295 return MemoryManager::PoolNTS;
296 #elif defined(OGDF_MEMORY_MALLOC_TS) 297 return MemoryManager::Malloc;
299 # error "OGDF is compiled without memory manager. Check your build configuration." static constexpr MemoryManager whichMemoryManager()
Returns the memory manager used by OGDF.
#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.
ostream & operator<<(ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
std::string toString(const Attribute &attr)
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.
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.