]> Creatis software - bbtk.git/blob - kernel/src/bbtkBlackBoxInputDescriptor.h
c67c2e4b0fe2e80f34f100c37d4c51fa886b189f
[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/08 06:59:29 $
7   Version:   $Revision: 1.4 $
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                             const std::string& nature,
50                             bool copy_construct = true,
51                             OptionType option = MANDATORY
52                             )
53       : BlackBoxInputOutputDescriptor(creator_type_info,name,
54                                       description,nature,
55                                       copy_construct),
56         mOption(option)
57     {}
58     /// Returns the option of the input
59     OptionType GetOption() const { return mOption; }
60     
61   protected:
62     /// Default ctor is reserved to children
63     BlackBoxInputDescriptor() : BlackBoxInputOutputDescriptor(),
64                                 mOption(OPTIONAL) {}
65
66   private:
67     /// The option of the input 
68     OptionType mOption;
69   };
70   
71 }
72 // namespace bbtk
73 #endif