Several useful macros defined by the OGDF.
More...
|
| #define | OGDF_THROW_PARAM(CLASS, PARAM) cout<<flush,Logger::sfout()<<flush,throw CLASS ( PARAM ) |
| | Replacement for throw. More...
|
| |
| #define | OGDF_THROW(CLASS) cout<<flush,Logger::sfout()<<flush,throw CLASS ( ) |
| | Replacement for throw. More...
|
| |
Several useful macros defined by the OGDF.
◆ OGDF_ASSERT
| #define OGDF_ASSERT |
( |
|
expr | ) |
|
◆ OGDF_ASSERT_IF
| #define OGDF_ASSERT_IF |
( |
|
minLevel, |
|
|
|
expr |
|
) |
| |
Assert condition expr if debug level is at least minLevel.
Definition at line 44 of file basic.h.
◆ OGDF_DECL_ALIGN
| #define OGDF_DECL_ALIGN |
( |
|
b | ) |
|
Specify the minimum alignment (in bytes) of a type to be b. This is used in type declarations.
Definition at line 152 of file config.h.
◆ OGDF_DEPRECATED
| #define OGDF_DEPRECATED |
( |
|
reason | ) |
|
Mark a class / member / function as deprecated.
Definition at line 118 of file config.h.
◆ OGDF_LIKELY
| #define OGDF_LIKELY |
( |
|
x | ) |
(x) |
Specify the likely branch in a condition.
Usage:
if (
OGDF_LIKELY(i >= 0)) { likely branch }
else { unlikely branch }
Definition at line 141 of file config.h.
◆ OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Creates new and delete operators in a class using the given memory allocator. In other words, adding this macro in a class declaration makes that class managed by the respective memory manager. Throws an ogdf::InsufficientMemoryException if no more memory is available.
Definition at line 91 of file memory.h.
◆ OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
Creates new and delete operators in a class using the given memory allocator. In other words, adding this macro in a class declaration makes that class managed by the respective memory manager. Throws an ogdf::InsufficientMemoryException if no more memory is available.
Definition at line 84 of file memory.h.
◆ OGDF_SET_DEBUG_LEVEL
| #define OGDF_SET_DEBUG_LEVEL |
( |
|
level | ) |
|
Set debug level to level.
Definition at line 47 of file basic.h.
◆ OGDF_THROW
| #define OGDF_THROW |
( |
|
CLASS | ) |
cout<<flush,Logger::sfout()<<flush,throw CLASS ( ) |
Replacement for throw.
This macro is used to throw an exception and pass the file name and line number of the location in the source file (in Debug mode only).
- Parameters
-
| CLASS | is the name of the exception class. |
Definition at line 60 of file exceptions.h.
◆ OGDF_THROW_PARAM
| #define OGDF_THROW_PARAM |
( |
|
CLASS, |
|
|
|
PARAM |
|
) |
| cout<<flush,Logger::sfout()<<flush,throw CLASS ( PARAM ) |
Replacement for throw.
This macro is used to throw an exception and pass the file name and line number of the location in the source file (in Debug mode only).
- Parameters
-
| CLASS | is the name of the exception class. |
| PARAM | is an additional parameter (like the error code) required by the exception calls. |
Definition at line 51 of file exceptions.h.
◆ OGDF_UNLIKELY
| #define OGDF_UNLIKELY |
( |
|
x | ) |
(x) |
Specify the unlikely branch in a condition.
Usage:
if (
OGDF_UNLIKELY(
set.empty())) { unlikely branch }
else { likely branch }
Definition at line 148 of file config.h.