1 /*=========================================================================
4 Module: $RCSfile: bbtkBlackBoxOutputDescriptor.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::BlackBoxOutputDescriptor : abstract descriptor of an output of a black box (stores a name, a description and type)
24 * \class bbtk::BlackBoxOutputDescriptor
25 * \brief Abstract descriptor of an output of a black box (stores a name, a description and type)
28 #ifndef __bbtkBlackBoxOutputDescriptor_h__
29 #define __bbtkBlackBoxOutputDescriptor_h__
32 #include "bbtkSystem.h"
40 class BBTK_EXPORT BlackBoxOutputDescriptor
43 /// Ctor with name and description
44 BlackBoxOutputDescriptor( const std::string& name,
45 const std::string& description,
46 bool copy_construct = true)
47 : mName(name), mDescription(description),
48 mCopyConstruct(copy_construct)
51 /// Returns the name of the output
52 const std::string& GetName() const { return mName; }
53 /// Returns the description of the output
54 const std::string& GetDescription() const { return mDescription; }
55 /// Returns the type of the output
56 virtual TypeInfo GetTypeInfo() const = 0;
57 /// Returns the name of the type of the output
58 virtual std::string GetTypeName() const = 0;
59 /// Returns the name of the type of the output
60 virtual std::string GetHumanTypeName() const = 0;
61 /// Returns true iff the type is a pointer to class
62 virtual bool IsPointerType() const = 0;
63 /// Returns true iff the input must be copied
64 /// by the copy constructor of the box
65 bool GetCopyConstruct() const { return mCopyConstruct; }
69 /// Default ctor is private
70 BlackBoxOutputDescriptor() : mName(""), mDescription("") {}
71 /// The name of the output
73 /// The description of the output
74 std::string mDescription;
75 /// Does the output has to be copied by copy constructor
76 /// default = true. Must be set to false if it is
77 /// initialized by the user in bbUserCopyConstructor
78 /// (typically if it is a pointer)