-/*=========================================================================
+/*
+ # ---------------------------------------------------------------------
+ #
+ # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+ # pour la SantÈ)
+ # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+ # Previous Authors : Laurent Guigues, Jean-Pierre Roux
+ # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+ #
+ # This software is governed by the CeCILL-B license under French law and
+ # abiding by the rules of distribution of free software. You can use,
+ # modify and/ or redistribute the software under the terms of the CeCILL-B
+ # license as circulated by CEA, CNRS and INRIA at the following URL
+ # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+ # or in the file LICENSE.txt.
+ #
+ # As a counterpart to the access to the source code and rights to copy,
+ # modify and redistribute granted by the license, users are provided only
+ # with a limited warranty and the software's author, the holder of the
+ # economic rights, and the successive licensors have only limited
+ # liability.
+ #
+ # The fact that you are presently reading this means that you have had
+ # knowledge of the CeCILL-B license and that you accept its terms.
+ # ------------------------------------------------------------------------ */
+
+
+/*=========================================================================
Program: bbtk
Module: $RCSfile: bbtkComplexBlackBoxDescriptor.cxx,v $
Language: C++
- Date: $Date: 2009/12/08 14:10:36 $
- Version: $Revision: 1.21 $
+ Date: $Date: 2012/11/16 08:49:01 $
+ Version: $Revision: 1.23 $
=========================================================================*/
-/* ---------------------------------------------------------------------
-
-* Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
-* Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
-*
-* This software is governed by the CeCILL-B license under French law and
-* abiding by the rules of distribution of free software. You can use,
-* modify and/ or redistribute the software under the terms of the CeCILL-B
-* license as circulated by CEA, CNRS and INRIA at the following URL
-* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-* or in the file LICENSE.txt.
-*
-* As a counterpart to the access to the source code and rights to copy,
-* modify and redistribute granted by the license, users are provided only
-* with a limited warranty and the software's author, the holder of the
-* economic rights, and the successive licensors have only limited
-* liability.
-*
-* The fact that you are presently reading this means that you have had
-* knowledge of the CeCILL-B license and that you accept its terms.
-* ------------------------------------------------------------------------ */
+
/**
ComplexBlackBoxDescriptor::ComplexBlackBoxDescriptor(const std::string& name)
{
bbtkDDebugMessage("object",2,"==> ComplexBlackBoxDescriptor(\""<<name<<"\")"<<std::endl);
+ SetTypeOfScript(TS_SCRIPT_COMPLEXBOX);
SetTypeName(name);
AddToCategory("complex box");
mPrototype = ComplexBlackBox::New(name+std::string("Prototype"),
Package::Pointer p = d->GetPackage();
std::string name = b->second->bbGetTypeName();
-
+
std::string url;
if (relative_link)
url = p->GetDocRelativeURL();
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;
+ }
+
+//===================================================
+ //==========================================================================
}