1 /*=========================================================================
4 Module: $RCSfile: bbtkBlackBoxInputDescriptor.h,v $
6 Date: $Date: 2008/01/22 15:02:00 $
7 Version: $Revision: 1.1 $
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.
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.
17 =========================================================================*/
21 * \brief Class bbtk::BlackBoxInputDescriptor : abstract descriptor of an input of a black box (stores a name, a description and type)
24 * \class bbtk::BlackBoxInputDescriptor
25 * \brief Abstract descriptor of an input of a black box (stores a name, a description and type)
28 #ifndef __bbtkBlackBoxInputDescriptor_h__
29 #define __bbtkBlackBoxInputDescriptor_h__
31 #include "bbtkSystem.h"
39 class BBTK_EXPORT BlackBoxInputDescriptor
48 /// Ctor with name and description
49 BlackBoxInputDescriptor( const std::string& name,
50 const std::string& description,
51 OptionType option = MANDATORY,
52 bool copy_construct = true)
53 : mName(name), mDescription(description),
54 mOption(option), mCopyConstruct(copy_construct)
57 /// Returns the name of the input
58 const std::string& GetName() const { return mName; }
59 /// Returns the description of the input
60 const std::string& GetDescription() const { return mDescription; }
61 /// Returns the type of the input
62 virtual TypeInfo GetTypeInfo() const = 0;
63 /// Returns the name of the type of the input
64 virtual std::string GetTypeName() const = 0;
65 /// Returns the name of the type of the input
66 virtual std::string GetHumanTypeName() const = 0;
67 /// Returns true iff the type is a pointer to class
68 virtual bool IsPointerType() const = 0;
69 /// Returns the option of the input
70 OptionType GetOption() const { return mOption; }
71 /// Returns true iff the input must be copied
72 /// by the copy constructor of the box
73 bool GetCopyConstruct() const { return mCopyConstruct; }
76 /// Default ctor is private
77 BlackBoxInputDescriptor() : mName(""), mDescription(""),
79 /// The name of the input
81 /// The description of the input
82 std::string mDescription;
83 /// The option of the input
85 /// Does the input has to be copied by copy constructor
86 /// default = true. Must be set to false if it is
87 /// initialized by the user in bbUserCopyConstructor
88 /// (typically if it is a pointer)