1 /*=========================================================================
4 Module: $RCSfile: bbtkAtomicBlackBoxOutputDescriptor.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::AtomicBlackBoxOutputDescriptor : structure containing the description of a AtomicBlackBox output (name, description, type, functor)
24 * \class bbtk::AtomicBlackBoxOutputDescriptor
25 * \brief Structure containing the description of a AtomicBlackBox output (name, description, type, functor)
28 #ifndef __bbtkAtomicBlackBoxOutputDescriptor_h__
29 #define __bbtkAtomicBlackBoxOutputDescriptor_h__
31 #include "bbtkBlackBoxOutputDescriptor.h"
32 #include "bbtkAtomicBlackBoxGetSetFunctor.h"
33 #include "bbtkMessageManager.h"
39 class BBTK_EXPORT AtomicBlackBoxOutputDescriptor :
40 public bbtk::BlackBoxOutputDescriptor
44 AtomicBlackBoxOutputDescriptor( TypeInfo creator_type_info,
45 const std::string& name,
46 const std::string& description,
47 AtomicBlackBoxGetFunctor* getfunctor,
48 AtomicBlackBoxSetFunctor* setfunctor,
49 bool copy_construct = true);
50 ~AtomicBlackBoxOutputDescriptor();
52 /// Returns the type of the input
53 TypeInfo GetTypeInfo() const { return mGetFunctor->GetTypeInfo(); }
54 /// Returns the name of the type of the input
55 std::string GetTypeName() const { return mGetFunctor->GetTypeName(); }
56 /// Returns the name of the type of the input
57 std::string GetHumanTypeName() const { return mGetFunctor->GetHumanTypeName(); }
58 /// Returns true iff the type is a pointer to class
59 virtual bool IsPointerType() const { return mGetFunctor->IsPointerType(); } /// Returns the functor on the Get method
60 AtomicBlackBoxGetFunctor* GetGetFunctor() { return mGetFunctor; }
61 /// Returns the functor on the Set method
62 AtomicBlackBoxSetFunctor* GetSetFunctor() { return mSetFunctor; }
66 /// Default ctor is private
67 AtomicBlackBoxOutputDescriptor() :
68 BlackBoxOutputDescriptor(typeid(void),"","") {}
69 /// The functor on the Get method
70 AtomicBlackBoxGetFunctor* mGetFunctor;
71 /// The functor on the Set method
72 AtomicBlackBoxSetFunctor* mSetFunctor;