]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkComplexBlackBoxDescriptor.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkComplexBlackBoxDescriptor.cxx
index e421055a8e2c5c65f136566801765cacbe528f6c..679557533a763c58d095c50de67622675c931cf8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkComplexBlackBoxDescriptor.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/04/08 06:59:30 $
-  Version:   $Revision: 1.13 $
+  Date:      $Date: 2008/04/09 11:16:57 $
+  Version:   $Revision: 1.14 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -40,6 +40,7 @@ namespace bbtk
     SetTypeName(name);
     AddToCategory("complex box");
     mPrototype = new ComplexBlackBox(name+std::string("Prototype"),this);
+    // this->Reference();
     bbtkDebugDecTab("Kernel",9);
   }
   //=======================================================================
@@ -50,14 +51,22 @@ namespace bbtk
   /// Default dtor
   ComplexBlackBoxDescriptor::~ComplexBlackBoxDescriptor()
   {
-    bbtkDebugMessageInc("Kernel",9,"ComplexBlackBoxDescriptor::~ComplexBlackBoxDescriptor(\""<<GetTypeName()<<"\")"<<std::endl);
+    bbtkDebugMessageInc("Kernel",1,"ComplexBlackBoxDescriptor::~ComplexBlackBoxDescriptor(\""<<GetTypeName()<<"\")"<<std::endl);
 
     delete mPrototype;
 
-    bbtkDebugDecTab("Kernel",9);
+    bbtkDebugMessage("Kernel",1,"EO ComplexBlackBoxDescriptor::~ComplexBlackBoxDescriptor(\""<<GetTypeName()<<"\")"<<std::endl);
+   bbtkDebugDecTab("Kernel",1);
   }
   //=======================================================================
 
+  //=========================================================================
+  /// Check
+  void ComplexBlackBoxDescriptor::Check(bool recursive) const
+  {
+    mPrototype->Check(recursive);
+  }
+  //=========================================================================
 
   //=======================================================================
   /// Creates an instance of name <name> of the ComplexBlackBox of which this is the descriptor 
@@ -466,12 +475,15 @@ namespace bbtk
     InputDescriptorMapType::const_iterator i;
     unsigned int namelmax = 0;
     unsigned int typelmax = 0;
+    unsigned int natlmax = 0;
     for ( i = mInput.begin();  i != mInput.end(); ++i ) 
     {
           if (i->second->GetName().size()>namelmax) 
             namelmax = i->second->GetName().size();
           if (i->second->GetTypeName().size()>typelmax) 
             typelmax = i->second->GetTypeName().size();
+          if (i->second->GetNature().size()>natlmax) 
+            natlmax = i->second->GetNature().size();
     }
     OutputDescriptorMapType::const_iterator o;
     if (full) 
@@ -482,6 +494,8 @@ namespace bbtk
               namelmax = o->second->GetName().size();
            if (o->second->GetTypeName().size()>typelmax) 
               typelmax = o->second->GetTypeName().size();
+          if (o->second->GetNature().size()>natlmax) 
+            natlmax = o->second->GetNature().size();
           }
     }
     //
@@ -494,10 +508,14 @@ namespace bbtk
           std::string type(i->second->GetTypeName());
           type += ">";
           type.append(1+typelmax-type.size(),' ');
+          std::string nature(i->second->GetNature());
+          nature += "]";
+          nature.append(1+natlmax-nature.size(),' ');
           bbtkMessage("Help",1,
-                   "    '"<<name
-                   <<" <"<<type
-                   <<" : "<<i->second->GetDescription()<<std::endl);
+                      "    '"<<name
+                      <<" <"<<type
+                      <<" ["<<nature
+                      <<" : "<<i->second->GetDescription()<<std::endl);
     }
     if (full) 
     {
@@ -513,9 +531,13 @@ namespace bbtk
             std::string type(o->second->GetTypeName());
             type += ">";
             type.append(1+typelmax-type.size(),' ');
+            std::string nature(o->second->GetNature());
+            nature += "]";
+            nature.append(1+natlmax-nature.size(),' ');
             bbtkMessage("Help",1,
-                        "    '"<<name
+                      "    '"<<name
                         <<" <"<<type
+                        <<" ["<<nature
                         <<" : "<<o->second->GetDescription()<<std::endl);
           }
     }