]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkBlackBoxOutputDescriptor.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkBlackBoxOutputDescriptor.h
index c4196715c4153718ece6783acfdbd098bbe6fefc..cba3a638375fc7a10ab0c6a29d652bc8ea68e8e0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBoxOutputDescriptor.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/06 14:14:22 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/04/04 08:04:05 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 #ifndef __bbtkBlackBoxOutputDescriptor_h__
 #define __bbtkBlackBoxOutputDescriptor_h__
 
-
-#include "bbtkSystem.h"
-#include "bbtkData.h"
-#include "bbtkRTTI.h"
+#include "bbtkBlackBoxInputOutputDescriptor.h"
 
 namespace bbtk
 {
   
   class BBTK_EXPORT BlackBoxOutputDescriptor
+    : public BlackBoxInputOutputDescriptor
   {
   public:
     /// Ctor with name and description
@@ -44,46 +42,16 @@ namespace bbtk
                              const std::string& name,
                              const std::string& description,
                              bool copy_construct = true)
-      : mCreatorTypeInfo(creator_type_info),
-       mName(name), mDescription(description), 
-       mCopyConstruct(copy_construct) 
+      : BlackBoxInputOutputDescriptor(creator_type_info,name,
+                                     description,
+                                     copy_construct)
+    {}
+  protected:
+    /// Default ctor is reserved to children
+    BlackBoxOutputDescriptor() : 
+      BlackBoxInputOutputDescriptor()
     {}
-
-    /// Returns the TypeInfo of the BlackBoxDescriptor which created this descriptor
-    TypeInfo GetCreatorTypeInfo() { return mCreatorTypeInfo; }
-    /// Returns the name of the output
-    const std::string& GetName() const { return mName; }
-    /// Returns the description of the output
-    const std::string& GetDescription() const { return mDescription; }
-    /// Returns the type of the output
-    virtual TypeInfo GetTypeInfo() const = 0;
-    /// Returns the name of the type of the output
-    virtual std::string GetTypeName() const = 0;
-    /// Returns the name of the type of the output
-    virtual std::string GetHumanTypeName() const = 0;
-     /// Returns true iff the type is a pointer to class 
-    virtual bool IsPointerType() const = 0;
-    /// Returns true iff the input must be copied 
-    /// by the copy constructor of the box
-    bool GetCopyConstruct() const { return mCopyConstruct; }
-    
-    
-  private:
-    /// Default ctor is private
-    BlackBoxOutputDescriptor() : mCreatorTypeInfo(typeid(void)),
-                                mName(""), mDescription("") {}
-
-    /// The TypeInfo of the BlackBoxDescriptor which created this descriptor
-    TypeInfo mCreatorTypeInfo;
-    /// The name of the output
-    std::string mName;
-    /// The description of the output
-    std::string mDescription;
-     /// Does the output has to be copied by copy constructor 
-    /// default = true. Must be set to false if it is 
-    /// initialized by the user in bbUserCopyConstructor 
-    /// (typically if it is a pointer)
-    bool mCopyConstruct;
  };
   
 }