1 /*=========================================================================
4 Module: $RCSfile: bbtkAtomicBlackBoxInputDescriptor.h,v $
6 Date: $Date: 2008/02/07 11:06:37 $
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::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 AtomicBlackBoxGetFunctor* getfunctor,
53 AtomicBlackBoxSetFunctor* setfunctor,
54 bool copy_construct = true);
56 ~AtomicBlackBoxInputDescriptor();
57 /// Returns the type of the input
58 TypeInfo GetTypeInfo() const { return mGetFunctor->GetTypeInfo(); }
59 /// Returns the name of the type of the input
60 std::string GetTypeName() const { return mGetFunctor->GetTypeName(); }
61 /// Returns the name of the type of the input
62 std::string GetHumanTypeName() const { return mGetFunctor->GetHumanTypeName(); }
63 /// Returns true iff the type is a pointer to class
64 virtual bool IsPointerType() const { return mGetFunctor->IsPointerType(); }
65 /// Returns the functor on the Get method
66 AtomicBlackBoxGetFunctor* GetGetFunctor() { return mGetFunctor; }
67 /// Returns the functor on the Set method
68 AtomicBlackBoxSetFunctor* GetSetFunctor() { return mSetFunctor; }
72 /// Default ctor is private
73 AtomicBlackBoxInputDescriptor() :
74 BlackBoxInputDescriptor(typeid(void),"","") {}
75 /// The functor on the Get method
76 AtomicBlackBoxGetFunctor* mGetFunctor;
77 /// The functor on the Set method
78 AtomicBlackBoxSetFunctor* mSetFunctor;