]> Creatis software - bbtk.git/blob - kernel/src/bbtkAtomicBlackBoxOutputDescriptor.h
d2f705b527bca1247b0a75f20513b47d8c58e771
[bbtk.git] / kernel / src / bbtkAtomicBlackBoxOutputDescriptor.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbtkAtomicBlackBoxOutputDescriptor.h,v $
5   Language:  C++
6   Date:      $Date: 2008/04/08 06:59:29 $
7   Version:   $Revision: 1.2 $
8                                                                                 
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.
12                                                                                 
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.
16                                                                                 
17 =========================================================================*/
18
19 /**
20  *  \file 
21  *  \brief Class bbtk::AtomicBlackBoxOutputDescriptor : structure containing the description of a AtomicBlackBox output (name, description, type, functor)
22  */
23 /**
24  * \class bbtk::AtomicBlackBoxOutputDescriptor
25  * \brief Structure containing the description of a AtomicBlackBox output (name, description, type, functor)
26  */
27
28 #ifndef __bbtkAtomicBlackBoxOutputDescriptor_h__
29 #define __bbtkAtomicBlackBoxOutputDescriptor_h__
30
31 #include "bbtkBlackBoxOutputDescriptor.h"
32 #include "bbtkAtomicBlackBoxGetSetFunctor.h"
33 #include "bbtkMessageManager.h"
34
35 namespace bbtk
36 {
37
38
39   class BBTK_EXPORT AtomicBlackBoxOutputDescriptor : 
40     public bbtk::BlackBoxOutputDescriptor
41   {
42   public:
43       
44     AtomicBlackBoxOutputDescriptor( TypeInfo creator_type_info,
45                                     const std::string& name,
46                                     const std::string& description,
47                                     const std::string& nature,
48                                     AtomicBlackBoxGetFunctor* getfunctor,
49                                     AtomicBlackBoxSetFunctor* setfunctor,
50                                     bool copy_construct = true);
51     ~AtomicBlackBoxOutputDescriptor();
52     
53     /// Returns the type of the input
54     TypeInfo GetTypeInfo() const { return mGetFunctor->GetTypeInfo(); }
55     /// Returns the name of the type of the input
56     std::string GetTypeName() const { return mGetFunctor->GetTypeName(); }
57    /// Returns the name of the type of the input
58     std::string GetHumanTypeName() const { return mGetFunctor->GetHumanTypeName(); }
59     /// Returns true iff the type is a pointer to class 
60     virtual bool IsPointerType() const { return mGetFunctor->IsPointerType(); }   /// Returns the functor on the Get method
61     AtomicBlackBoxGetFunctor* GetGetFunctor() { return mGetFunctor; }
62     /// Returns the functor on the Set method
63     AtomicBlackBoxSetFunctor* GetSetFunctor() { return mSetFunctor; }
64     
65     
66   private:
67     /// Default ctor is private 
68     AtomicBlackBoxOutputDescriptor() : 
69       BlackBoxOutputDescriptor(typeid(void),"","","") {}
70     /// The functor on the Get method
71     AtomicBlackBoxGetFunctor* mGetFunctor;
72     /// The functor on the Set method
73     AtomicBlackBoxSetFunctor* mSetFunctor;
74   };
75
76   
77 }
78 // namespace bbtk
79 #endif