]> Creatis software - bbtk.git/blob - kernel/src/bbtkItkBlackBoxMacros.h
52cd4f8c63d9085e353a5a07eeaa18e621022b48
[bbtk.git] / kernel / src / bbtkItkBlackBoxMacros.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbtkItkBlackBoxMacros.h,v $
5   Language:  C++
6   Date:      $Date: 2008/05/07 06:31:37 $
7   Version:   $Revision: 1.1 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18
19
20 /**
21  *  \file 
22  *  \brief Defines macros for the creation of itk object inherited black boxes
23  */
24 #ifndef __bbtkItkBlackBoxMacros_h__
25 #define __bbtkItkBlackBoxMacros_h__
26 //===========================================================================
27 //============================================================================
28 // ITK Specific macros
29 //===========================================================================
30 //===========================================================================
31
32
33 //===========================================================================
34 /// Declares an itk-inherited AtomicBlackBox input 
35 #define BBTK_DECLARE_ITK_INPUT(PARENT,NAME,TYPE)                        \
36   public:                                                               \
37   TYPE bbGetInput##NAME ()                                              \
38   { return PARENT::GetInput(); }                                        \
39   void bbSetInput##NAME (TYPE d)                                        \
40   { PARENT::SetInput(d);                                                \
41     /*bbSetModifiedStatus();*/ }                                                       
42 //===========================================================================
43
44 //===========================================================================
45 #define BBTK_DECLARE_ITK_OUTPUT(PARENT,NAME,TYPE)                       \
46   public:                                                               \
47   TYPE bbGetOutput##NAME ()                                             \
48   { return PARENT::GetOutput(); }                                       \
49   void bbSetOutput##NAME (TYPE d)                                       \
50   { /*PARENT::GetOutput() = d;*/ }                                      
51 //===========================================================================
52
53 //===========================================================================
54 /// Declares an AtomicBlackBox input corresponding to an inherited itk parameter
55 /// which was declared by itkSetMacro/itkGetMacro
56 /// The NAME **MUST** be the same than the itk parameter name
57 #define BBTK_DECLARE_ITK_PARAM(PARENT,NAME,TYPE)                        \
58   public:                                                               \
59   TYPE bbGetInput##NAME ()                                              \
60   { return PARENT::Get##NAME(); }                                       \
61   void bbSetInput##NAME (TYPE d)                                        \
62   { PARENT::Set##NAME(d);                                               \
63     /*bbSetModifiedStatus();*/ }
64 //===========================================================================
65
66
67 //===========================================================================
68 /// EOF
69 //===========================================================================
70 #endif