1 /*=========================================================================
3 Module: $RCSfile: bbtkAtomicBlackBoxDescriptor.cxx,v $
5 Date: $Date: 2009/05/28 08:12:05 $
6 Version: $Revision: 1.4 $
7 =========================================================================*/
9 /* ---------------------------------------------------------------------
11 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
12 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
14 * This software is governed by the CeCILL-B license under French law and
15 * abiding by the rules of distribution of free software. You can use,
16 * modify and/ or redistribute the software under the terms of the CeCILL-B
17 * license as circulated by CEA, CNRS and INRIA at the following URL
18 * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
19 * or in the file LICENSE.txt.
21 * As a counterpart to the access to the source code and rights to copy,
22 * modify and redistribute granted by the license, users are provided only
23 * with a limited warranty and the software's author, the holder of the
24 * economic rights, and the successive licensors have only limited
27 * The fact that you are presently reading this means that you have had
28 * knowledge of the CeCILL-B license and that you accept its terms.
29 * ------------------------------------------------------------------------ */
31 #include "bbtkAtomicBlackBoxDescriptor.h"
32 #include "bbtkBlackBox.h"
33 #include "bbtkPackage.h"
34 #define bbtkDMessage(key,level,mess) \
35 bbtkMessage(key,level,"["<<GetFullTypeName()<<"] "<<mess)
36 #define bbtkDDebugMessage(key,level,mess) \
37 bbtkDebugMessage(key,level,"["<<GetFullTypeName()<<"] "<<mess)
41 AtomicBlackBoxDescriptor::AtomicBlackBoxDescriptor()
43 bbtkDDebugMessage("object",3,"==> AtomicBlackBoxDescriptor()"<<std::endl);
44 // Creates the input 'BoxProcessMode'
47 bbtk::AtomicBlackBoxInputDescriptor
48 (typeid(AtomicBlackBoxDescriptor),
50 "Sets the processing mode of the box (Pipeline | Always | Reactive)",
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'
57 bbtk::AtomicBlackBoxInputDescriptor
58 (typeid(AtomicBlackBoxDescriptor),
60 "Any signal received by this input executes the box",
62 new bbtk::AtomicBlackBoxTGetFunctor<BlackBox,Void,Void>(&BlackBox::bbGetInputBoxExecute),
63 new bbtk::AtomicBlackBoxTSetFunctor<BlackBox,Void,Void>(&BlackBox::bbSetInputBoxExecute) ) );
64 // Creates the output 'BoxChange'
67 bbtk::AtomicBlackBoxOutputDescriptor
68 (typeid(AtomicBlackBoxDescriptor),
70 "Signals modifications of the box",
72 new bbtk::AtomicBlackBoxTGetFunctor<BlackBox,Void,Void>(&BlackBox::bbGetOutputBoxChange),
73 new bbtk::AtomicBlackBoxTSetFunctor<BlackBox,Void,Void>(&BlackBox::bbSetOutputBoxChange) ) );
75 AddToCategory("atomic box");
76 bbtkDDebugMessage("object",3,"<== AtomicBlackBoxDescriptor()"<<std::endl);
78 //===================================================================
80 AtomicBlackBoxDescriptor::~AtomicBlackBoxDescriptor()
82 bbtkDDebugMessage("object",3,"==> ~AtomicBlackBoxDescriptor()"<<std::endl);