| OpenMS 2.5.0

Macros
Condition macros
Concept

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

## 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.

Referenced by EmgScoring::calcElutionFitScore(), MRMTransitionGroupPicker::createMRMFeature(), XMLHandler::cvStringToEnum_(), DPosition< DIMENSION >::DPosition(), DRange< 3 >::DRange(), MRMTransitionGroup< SpectrumT, TransitionT >::getBestFeature(), PeptideCompound::getChargeState(), TraMLProduct::getChargeState(), MRMTransitionGroup< SpectrumT, TransitionT >::getChromatogram(), SpectrumCanvas::getCurrentLayer(), PeakIndex::getFeature(), SpectrumCanvas::getLayer(), SpectrumCanvas::getLayer_(), SpectrumCanvas::getLayerFlag(), ProductModel< 2 >::getModel(), PeakIndex::getPeak(), MRMTransitionGroup< SpectrumT, TransitionT >::getPrecursorChromatogram(), RetentionTime::getRT(), PeakIndex::getSpectrum(), MRMTransitionGroup< SpectrumT, TransitionT >::getTransition(), DPosition< DIMENSION >::getX(), DPosition< DIMENSION >::getY(), PeakIntegrator::integratePeak_(), MRMTransitionGroup< SpectrumT, TransitionT >::isInternallyConsistent(), OpenMS::FastLowessSmoothing::lowess(), MatchedIterator< CONT_T, TRAIT, CONST_T >::operator++(), Matrix< UInt >::operator<(), Matrix< UInt >::operator==(), DistanceMatrix< Value >::operator==(), DPosition< DIMENSION >::operator[](), MRMTransitionGroupPicker::pickTransitionGroup(), MultiGradient::precalculatedColorByIndex(), MultiGradient::precalculatedColorIndex(), MRMTransitionGroupPicker::prepareMasterContainer_(), OpenMS::processDriftTimeStack(), UTILProteomicsLFQ::quantifyFraction_(), LinearResamplerAlign::raster(), LinearResamplerAlign::raster_interpolate(), NucleicAcidSearchEngine::resolveAmbiguousMods_(), SpectrumCanvas::setLabel(), SpectrumCanvas::setLayerFlag(), ProductModel< 2 >::setModel(), DPosition< DIMENSION >::setX(), and DPosition< DIMENSION >::setY().