1 /*=========================================================================
4 Module: $RCSfile: bbtkAtomicBlackBoxInputDescriptor.h,v $
6 Date: $Date: 2008/04/08 06:59:29 $
7 Version: $Revision: 1.2 $
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::AtomicBlackBoxInputDescriptor : structure containing the description of a AtomicBlackBox input (name, description, type, functor)
24 * \class bbtk::AtomicBlackBoxInputDescriptor
25 * \brief Structure containing the description of a AtomicBlackBox input (name, description, type, functor)
28 #ifndef __bbtkAtomicBlackBoxInputDescriptor_h__
29 #define __bbtkAtomicBlackBoxInputDescriptor_h__
31 #include "bbtkBlackBoxInputDescriptor.h"
32 #include "bbtkAtomicBlackBoxGetSetFunctor.h"
39 class BBTK_EXPORT AtomicBlackBoxInputDescriptor :
40 public bbtk::BlackBoxInputDescriptor
49 AtomicBlackBoxInputDescriptor( TypeInfo creator_type_info,
50 const std::string& name,
51 const std::string& description,
52 const std::string& nature,
53 AtomicBlackBoxGetFunctor* getfunctor,
54 AtomicBlackBoxSetFunctor* setfunctor,
55 bool copy_construct = true);
57 ~AtomicBlackBoxInputDescriptor();
58 /// Returns the type of the input
59 TypeInfo GetTypeInfo() const { return mGetFunctor->GetTypeInfo(); }
60 /// Returns the name of the type of the input
61 std::string GetTypeName() const { return mGetFunctor->GetTypeName(); }
62 /// Returns the name of the type of the input
63 std::string GetHumanTypeName() const { return mGetFunctor->GetHumanTypeName(); }
64 /// Returns true iff the type is a pointer to class
65 virtual bool IsPointerType() const { return mGetFunctor->IsPointerType(); }
66 /// Returns the functor on the Get method
67 AtomicBlackBoxGetFunctor* GetGetFunctor() { return mGetFunctor; }
68 /// Returns the functor on the Set method
69 AtomicBlackBoxSetFunctor* GetSetFunctor() { return mSetFunctor; }
73 /// Default ctor is private
74 AtomicBlackBoxInputDescriptor() :
75 BlackBoxInputDescriptor(typeid(void),"","","") {}
76 /// The functor on the Get method
77 AtomicBlackBoxGetFunctor* mGetFunctor;
78 /// The functor on the Set method
79 AtomicBlackBoxSetFunctor* mSetFunctor;