iRoCS Toolbox  1.1.0
RequireHelpers.hh
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * Copyright (C) 2004-2015 Olaf Ronneberger, Florian Pigorsch, Jörg Mechnich,
4  * Thorsten Falk
5  *
6  * Image Analysis Lab, University of Freiburg, Germany
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  **************************************************************************/
23 
24 /**************************************************************************
25 ** Title: Helper functions for all Require-Classes
26 ** $RCSfile$
27 ** $Revision: 2825 $$Name$
28 ** $Date: 2009-09-15 17:04:15 +0200 (Tue, 15 Sep 2009) $
29 ** Copyright: GPL $Author: ronneber $
30 ** Description:
31 **
32 **
33 **
34 **-------------------------------------------------------------------------
35 **
36 ** $Log$
37 ** Revision 1.1 2004/08/26 08:36:59 ronneber
38 ** initital import
39 **
40 **
41 **
42 **************************************************************************/
43 
44 #ifndef REQUIREHELPERS_HH
45 #define REQUIREHELPERS_HH
46 
47 #ifdef HAVE_CONFIG_H
48 #include <config.hh>
49 #endif
50 
51 #define CHECK_CLASS_TEMPLATE1( c) c ___requirement1;
52 #define CHECK_CLASS_TEMPLATE2( c) c ___requirement2;
53 #define CHECK_CLASS_TEMPLATE3( c) c ___requirement3;
54 #define CHECK_MEMBER_TEMPLATE( c) if(false){ c ___req; svt_check::avoidUnunsedVariableWarning(___req);}
55 
56 // awfull workaround for Classes with 2 template parameters
57 #define CHECK_MEMBER_TEMPLATE_2PARAM( c1,c2) if(false){ c1,c2 ___req; svt_check::avoidUnunsedVariableWarning(___req);}
58 
59 #define CHECK_CLASS_TEMPLATE_2PARAM1( c1,c2) c1,c2 ___requirement1b;}
60 #define CHECK_CLASS_TEMPLATE_2PARAM2( c1,c2) c1,c2 ___requirement2b;}
61 #define CHECK_CLASS_TEMPLATE_2PARAM3( c1,c2) c1,c2 ___requirement3b;}
62 
63 
64 namespace svt_check
65 {
66  template<typename T> void avoidUnunsedVariableWarning( const T&){}
67 }
68 
69 #endif
void avoidUnunsedVariableWarning(const T &)