]> Creatis software - bbtk.git/blob - kernel/src/bbtkUserBlackBoxDescriptor.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkUserBlackBoxDescriptor.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbtkUserBlackBoxDescriptor.h,v $
5   Language:  C++
6   Date:      $Date: 2008/01/22 15:02:00 $
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  *  \file 
21  *  \brief Class bbtk::UserBlackBoxDescriptor : structure containing the description of a UserBlackBox input (name, description, type, functor)
22  */
23 /**
24  * \class bbtk::UserBlackBoxDescriptor
25  * \brief Structure containing the description of a UserBlackBox input (name, description, type, functor)
26  */
27  
28 #ifndef __bbtkUserBlackBoxDescriptor_h__
29 #define __bbtkUserBlackBoxDescriptor_h__
30
31 #include "bbtkBlackBoxDescriptor.h"
32 #include "bbtkUserBlackBoxInputDescriptor.h"
33 #include "bbtkUserBlackBoxOutputDescriptor.h"
34
35 namespace bbtk
36 {
37
38
39   class BBTK_EXPORT UserBlackBoxDescriptor : public bbtk::BlackBoxDescriptor
40   {
41   public:
42     UserBlackBoxDescriptor() 
43     {  
44       AddInputDescriptor(new bbtk::UserBlackBoxInputDescriptor("BoxProcessMode",
45                                                                "Set the process mode of the box (Pipeline | Always | Reactive)", 
46                                                                new bbtk::UserBlackBoxTGetFunctor<BlackBox,std::string,std::string>(&BlackBox::bbGetInputBoxProcessMode), 
47                                                                new bbtk::UserBlackBoxTSetFunctor<BlackBox,std::string,std::string>(&BlackBox::bbSetInputBoxProcessMode) ) );
48       AddInputDescriptor(new bbtk::UserBlackBoxInputDescriptor("BoxExecute",
49                                                                "Any change signal received by this input executes the box", 
50                                                                new bbtk::UserBlackBoxTGetFunctor<BlackBox,Void,Void>(&BlackBox::bbGetInputBoxExecute), 
51                                                                new bbtk::UserBlackBoxTSetFunctor<BlackBox,Void,Void>(&BlackBox::bbSetInputBoxExecute) ) );
52       
53       AddOutputDescriptor(new bbtk::UserBlackBoxOutputDescriptor("BoxChange",
54                                                                  "Propagates modification of the box", 
55                                                                  new bbtk::UserBlackBoxTGetFunctor<BlackBox,Void,Void>(&BlackBox::bbGetOutputBoxChange), 
56                                                                  new bbtk::UserBlackBoxTSetFunctor<BlackBox,Void,Void>(&BlackBox::bbSetOutputBoxChange) ) );
57     }
58   };
59     
60 }
61 // namespace bbtk
62 #endif