OpenMS
3.1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
openswathalgo/include/OpenMS/OPENSWATHALGO/Macros.h
Go to the documentation of this file.
1
// Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2
// SPDX-License-Identifier: BSD-3-Clause
3
//
4
// --------------------------------------------------------------------------
5
// $Maintainer: Hannes Roest $
6
// $Authors: Hannes Roest $
7
// --------------------------------------------------------------------------
8
9
#pragma once
10
11
#include <cassert>
12
13
// Simple implementation of PRE and POST conditions using assert (should be on
14
// during debug mode and off during release mode) with a informative message
15
// which is printed alongside the dump.
16
// see http://stackoverflow.com/questions/3692954/add-custom-messages-in-assert
17
// "Since a pointer "is true" if it's non-null, you can use the &&-operator to
18
// chain and display the message".
19
#define OPENSWATH_PRECONDITION(condition, message)\
20
assert( (condition) && (message));
21
22
#define OPENSWATH_POSTCONDITION(condition, message)\
23
assert( (condition) && (message));
24
OpenMS
OPENSWATHALGO
Macros.h
Generated on Wed Oct 18 2023 11:33:42 for OpenMS by
1.9.1