]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkComplexBlackBoxDescriptor.cxx
#3120 BBTK Bug New Normal - merge branch changestoITK3and4 FROM master
[bbtk.git] / kernel / src / bbtkComplexBlackBoxDescriptor.cxx
index 20d2ca9a2db3572ab4cf3a9306ba77a55e31fa31..b79fed3e10f1a81d3f5456a91313da7bd09651d2 100644 (file)
@@ -416,7 +416,7 @@ namespace bbtk
              Package::Pointer p = d->GetPackage();
            
              std::string name = b->second->bbGetTypeName();
-
+                               
              std::string url;
              if (relative_link) 
                 url = p->GetDocRelativeURL();
@@ -666,6 +666,60 @@ size_t  ComplexBlackBoxDescriptor::GetObjectInternalSize() const
     return s;
   }
   //==========================================================================
-
+void ComplexBlackBoxDescriptor::GetBoxesInside (NodeTreeC& tree, int cont) 
+       {
+               std::cout<<"getBoxesInside recursivo "<<std::endl;
+               cont++;
+               std::string name = GetTypeName();
+               std::cout<<"despues de getTypeName : "<<name<<std::endl;
+    std::string descr = GetDescription();
+    std::string author = GetAuthor();
        
+       //list.push_back(name);
+               tree.setData(name);
+       //list.push_back(descr);
+       //list.push_back(author);
+               int k = 0;
+               
+    const ComplexBlackBox::BlackBoxMapType& B = mPrototype->bbGetBlackBoxMap();
+
+               std::cout<<"----B size "<< B.size() << std::endl;
+               std::cout<<"----antes if "<<std::endl;
+    if (B.size()) 
+    {
+          std::set<BlackBoxDescriptor::Pointer> pdeps;
+          ComplexBlackBox::BlackBoxMapType::const_iterator b;
+                       std::cout<<"----antes for "<<std::endl;
+          for ( b = B.begin(); b != B.end(); ++b ) 
+          {
+                               BlackBoxDescriptor::Pointer d = b->second->bbGetDescriptor();
+                               //std::cout<<"nombre objeto d "<< d->GetObjectName() <<std::endl;
+                               
+             //if (pdeps.find(d) != pdeps.end()) 
+        //    continue;
+             //pdeps.insert(d);
+                               std::cout<<"----1~ "<<std::endl;
+             Package::Pointer p = d->GetPackage();
+             std::string nameBox = b->second->bbGetTypeName();
+                               std::string packageBox = p->GetName();
+                               tree.insertChild(nameBox);
+                               std::cout<<"----2~ "<<std::endl;
+                               //list.push_back(nameBox);
+                               //list.push_back(packageBox);
+                               std::cout<<"-----cont "<<cont<<std::endl;
+                               //tree.treeTour(cont);
+                               d->GetBoxesInside (tree.childs[k], cont);
+                               std::cout<<"----3~ "<<std::endl;
+                               //std::cout<<"--despues de la recursion "<<k<<std::endl;
+                               k++;
+           }   // for
+                       std::cout<<"----despues for "<<std::endl;
+     } // If B.size
+                       std::cout<<"----despues if "<<std::endl;
+                       std::cout<<"end getBoxesInside recursivo"<<std::endl;
+       }
+
+//===================================================
+
+        //==========================================================================
 }