OpenMS
Condition macros

Macros used for to enforce preconditions and postconditions. More...

Collaboration diagram for Condition macros:

Macros

#define OPENMS_PRECONDITION(condition, message)
 Precondition macro. More...
 
#define OPENMS_POSTCONDITION(condition, message)
 Postcondition macro. More...
 

Detailed Description

Macros used for to enforce preconditions and postconditions.

These macros are enabled if debug info is enabled and optimization is disabled in configure. Otherwise they are replaced by an empty string, so they won't cost any performance.

The macros throw Exception::Precondition or Exception::Postcondition respectively if the condition fails.

Macro Definition Documentation

◆ OPENMS_POSTCONDITION

#define OPENMS_POSTCONDITION (   condition,
  message 
)

Postcondition macro.

◆ OPENMS_PRECONDITION

#define OPENMS_PRECONDITION (   condition,
  message 
)

Precondition macro.