]> Creatis software - bbtk.git/blob - kernel/src/bbtkAtomicBlackBoxDescriptor.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkAtomicBlackBoxDescriptor.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbtkAtomicBlackBoxDescriptor.h,v $
5   Language:  C++
6   Date:      $Date: 2008/04/08 06:59:29 $
7   Version:   $Revision: 1.2 $
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::AtomicBlackBoxDescriptor : structure containing the description of a AtomicBlackBox input (name, description, type, functor)
22  */
23 /**
24  * \class bbtk::AtomicBlackBoxDescriptor
25  * \brief Structure containing the description of a AtomicBlackBox input (name, description, type, functor)
26  */
27  
28 #ifndef __bbtkAtomicBlackBoxDescriptor_h__
29 #define __bbtkAtomicBlackBoxDescriptor_h__
30
31 #include "bbtkBlackBoxDescriptor.h"
32 #include "bbtkAtomicBlackBoxInputDescriptor.h"
33 #include "bbtkAtomicBlackBoxOutputDescriptor.h"
34
35 namespace bbtk
36 {
37
38
39   class BBTK_EXPORT AtomicBlackBoxDescriptor : public bbtk::BlackBoxDescriptor
40   {
41   public:
42     AtomicBlackBoxDescriptor() 
43     {  
44       // Creates the input 'BoxProcessMode'
45       AddInputDescriptor
46         (new 
47          bbtk::AtomicBlackBoxInputDescriptor
48          (typeid(AtomicBlackBoxDescriptor),
49           "BoxProcessMode",
50           "Sets the processing mode of the box (Pipeline | Always | Reactive)",
51           "",
52           new bbtk::AtomicBlackBoxTGetFunctor<BlackBox,std::string,std::string>(&BlackBox::bbGetInputBoxProcessMode), 
53           new bbtk::AtomicBlackBoxTSetFunctor<BlackBox,std::string,std::string>(&BlackBox::bbSetInputBoxProcessMode) ) );
54       // Creates the input 'BoxExecute'
55       AddInputDescriptor
56         (new
57          bbtk::AtomicBlackBoxInputDescriptor
58          (typeid(AtomicBlackBoxDescriptor),
59           "BoxExecute",
60           "Any signal received by this input executes the box",
61           "",
62           new bbtk::AtomicBlackBoxTGetFunctor<BlackBox,Void,Void>(&BlackBox::bbGetInputBoxExecute), 
63           new bbtk::AtomicBlackBoxTSetFunctor<BlackBox,Void,Void>(&BlackBox::bbSetInputBoxExecute) ) );
64       // Creates the output 'BoxChange'      
65       AddOutputDescriptor
66         (new 
67          bbtk::AtomicBlackBoxOutputDescriptor
68          (typeid(AtomicBlackBoxDescriptor),
69           "BoxChange",
70           "Signal modifications of the box", 
71           "",
72           new bbtk::AtomicBlackBoxTGetFunctor<BlackBox,Void,Void>(&BlackBox::bbGetOutputBoxChange), 
73           new bbtk::AtomicBlackBoxTSetFunctor<BlackBox,Void,Void>(&BlackBox::bbSetOutputBoxChange) ) );
74       //
75       AddToCategory("atomic box");
76     }
77   };
78     
79 }
80 // namespace bbtk
81 #endif