]> Creatis software - bbtk.git/blob - kernel/src/bbtkUserBlackBoxOutputDescriptor.h
Recreated the complete cvs tree because the project architecture deeply changed
[bbtk.git] / kernel / src / bbtkUserBlackBoxOutputDescriptor.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbtkUserBlackBoxOutputDescriptor.h,v $
5   Language:  C++
6   Date:      $Date: 2008/01/22 15:02:00 $
7   Version:   $Revision: 1.1.1.1 $
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::UserBlackBoxOutputDescriptor : structure containing the description of a UserBlackBox output (name, description, type, functor)
22  */
23 /**
24  * \class bbtk::UserBlackBoxOutputDescriptor
25  * \brief Structure containing the description of a UserBlackBox output (name, description, type, functor)
26  */
27
28 #ifndef __bbtkUserBlackBoxOutputDescriptor_h__
29 #define __bbtkUserBlackBoxOutputDescriptor_h__
30
31 #include "bbtkBlackBoxOutputDescriptor.h"
32 #include "bbtkUserBlackBoxGetSetFunctor.h"
33 #include "bbtkMessageManager.h"
34
35 namespace bbtk
36 {
37
38
39   class BBTK_EXPORT UserBlackBoxOutputDescriptor : public bbtk::BlackBoxOutputDescriptor
40   {
41   public:
42       
43     UserBlackBoxOutputDescriptor( const std::string& name,
44                                   const std::string& description,
45                                   UserBlackBoxGetFunctor* getfunctor,
46                                   UserBlackBoxSetFunctor* setfunctor,
47                                   bool copy_construct = true);
48     ~UserBlackBoxOutputDescriptor();
49     
50     /// Returns the type of the input
51     TypeInfo GetTypeInfo() const { return mGetFunctor->GetTypeInfo(); }
52     /// Returns the name of the type of the input
53     std::string GetTypeName() const { return mGetFunctor->GetTypeName(); }
54    /// Returns the name of the type of the input
55     std::string GetHumanTypeName() const { return mGetFunctor->GetHumanTypeName(); }
56     /// Returns true iff the type is a pointer to class 
57     virtual bool IsPointerType() const { return mGetFunctor->IsPointerType(); }   /// Returns the functor on the Get method
58     UserBlackBoxGetFunctor* GetGetFunctor() { return mGetFunctor; }
59     /// Returns the functor on the Set method
60     UserBlackBoxSetFunctor* GetSetFunctor() { return mSetFunctor; }
61     
62     
63   private:
64     /// Default ctor is private 
65     UserBlackBoxOutputDescriptor() : BlackBoxOutputDescriptor("","") {}
66     /// The functor on the Get method
67     UserBlackBoxGetFunctor* mGetFunctor;
68     /// The functor on the Set method
69     UserBlackBoxSetFunctor* mSetFunctor;
70   };
71
72   
73 }
74 // namespace bbtk
75 #endif