]> Creatis software - bbtk.git/blob - kernel/src/bbtkBlackBoxInputDescriptor.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkBlackBoxInputDescriptor.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbtkBlackBoxInputDescriptor.h,v $
5   Language:  C++
6   Date:      $Date: 2008/04/04 08:04:05 $
7   Version:   $Revision: 1.3 $
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::BlackBoxInputDescriptor : abstract descriptor of an input of a black box 
22  */
23 /**
24  * \class bbtk::BlackBoxInputDescriptor
25  * \brief Abstract descriptor of an input of a black box 
26  */
27
28 #ifndef __bbtkBlackBoxInputDescriptor_h__
29 #define __bbtkBlackBoxInputDescriptor_h__
30
31 #include "bbtkBlackBoxInputOutputDescriptor.h"
32
33 namespace bbtk
34 {
35   class BBTK_EXPORT BlackBoxInputDescriptor 
36     : public BlackBoxInputOutputDescriptor
37   {
38   public:
39     typedef enum {
40       MANDATORY,
41       OPTIONAL
42     } OptionType;
43     
44     
45     /// Ctor with name and description
46     BlackBoxInputDescriptor(TypeInfo creator_type_info,
47                             const std::string& name,
48                             const std::string& description,
49                             OptionType option = MANDATORY,
50                             bool copy_construct = true)
51       : BlackBoxInputOutputDescriptor(creator_type_info,name,
52                                       description,copy_construct),
53         mOption(option)
54     {}
55     /// Returns the option of the input
56     OptionType GetOption() const { return mOption; }
57     
58   protected:
59     /// Default ctor is reserved to children
60     BlackBoxInputDescriptor() : BlackBoxInputOutputDescriptor(),
61                                 mOption(OPTIONAL) {}
62
63   private:
64     /// The option of the input 
65     OptionType mOption;
66   };
67   
68 }
69 // namespace bbtk
70 #endif