]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkPackage.cxx
#3477 bug InputText initial value
[bbtk.git] / kernel / src / bbtkPackage.cxx
index 1aa5a1c19a980ec2ddb61372af3d3fdc79501850..bcb83089a34c8c5ff3898cc58779cfa822dc22d3 100644 (file)
@@ -1,33 +1,40 @@
+/*
+ # ---------------------------------------------------------------------
+ #
+ # 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: bbtkPackage.cxx,v $
   Language:  C++
-  Date:      $Date: 2012/11/14 07:12:00 $
-  Version:   $Revision: 1.36 $
+  Date:      $Date: 2012/11/16 08:49:01 $
+  Version:   $Revision: 1.37 $
 =========================================================================*/
 
-/* ---------------------------------------------------------------------
-
-* 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.
-* ------------------------------------------------------------------------ */                                                                         
+
 
 /**
  *\file
@@ -80,6 +87,8 @@ namespace bbtk
   {
     bbtkDebugMessage("object",2,"==> Package('"<<name<<"',...)"
                     <<bbtkendl);
+
+                        
     std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
     char c = default_doc_dir.c_str()[strlen(default_doc_dir.c_str())-1];
     std::string url = default_doc_dir; 
@@ -102,7 +111,6 @@ namespace bbtk
     //    std::cout  << "relurl=["<<relurl<<"]"<<std::endl;
     bbtkDebugMessage("object",2,"<== Package::Package('"<<name<<"',...) OK"
                     <<bbtkendl);
-
   }
   //==========================================================================
 
@@ -352,6 +360,9 @@ namespace bbtk
   DynamicLibraryHandler Package::OpenDynamicLibrary( const std::string& libname,const std::string& package_name,
                                                                                                         DLGetPackageFunction& getpack, DLDeletePackageFunction& delpack)
   {
+
+printf("EED Package::OpenDynamicLibrary  %s   %s \n", libname.c_str(), package_name.c_str() );
+
     bbtkDebugMessage("package",3,"==> Package::OpenDynamicLibrary("
                     <<libname<<")"<<std::endl);
 #if defined(__GNUC__)
@@ -359,8 +370,7 @@ namespace bbtk
     // Open shared lib
     void *handler;
     handler = dlopen(libname.c_str(), BBTK_RTLD_TIME | BBTK_RTLD_SCOPE );
-//EED     handler = dlopen(libname.c_str(), RTLD_LAZY | RTLD_LOCAL );
-         
+//     handler = dlopen(libname.c_str(), RTLD_LAZY | RTLD_LOCAL );
     if (!handler)
       {
        bbtkMessage("package",0,
@@ -389,6 +399,7 @@ namespace bbtk
     bbtkDebugMessage("package",3,"* Symbol ["<<getvername
                     <<"] found"<<std::endl);
     // version matches ?
+
     if (getbbtkversion() != bbtk::GetVersion())
       {
        bbtkMessage("package",0,
@@ -711,7 +722,7 @@ namespace bbtk
                                const DataInfo& typeout,
                                const std::string& name) const
   {
-    bbtkDebugMessageInc("kernel",8,"Package<"<<GetName()<<
+      bbtkDebugMessageInc("kernel",8,"Package<"<<GetName()<<
                        ">::NewAdaptor("
                        <<typein<<","
                        <<typeout<<",\""
@@ -727,8 +738,7 @@ namespace bbtk
       }
     BlackBox::Pointer bb =i->second.lock()->NewBlackBox(name);
     bbtkDebugDecTab("kernel",8);
-    return bb;   
-
+    return bb;
   }
   //==========================================================================
 
@@ -1202,10 +1212,7 @@ namespace bbtk
            s << "<hr>\n";
            */
          }
-      }
-
-    else 
-      {
+      } else {
        s << "<h1 class=\"settitle\">"<<title<<"</h1>\n";
        s << "<p><TABLE cellspacing=0  cellpadding=3>\n";
        s << "<TR><TD style='vertical-align: top;'><b> Description </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'> " 
@@ -1397,10 +1404,21 @@ namespace bbtk
     return s;
   }
   //==========================================================================
-  
+  void  Package::GetBoxesInside(NodeTreeC& tree, int cont) 
+  {
+               DescriptorMapType::const_iterator i;
+               std::cout<<"*********a********"<<std::endl;
+               for (i=mDescriptorMap.begin(); i!=mDescriptorMap.end(); ++i) 
+               {
+                       i->second->GetBoxesInside(tree, cont);
+                       std::cout<<"*****************"<<std::endl;
+               }    
+  }
+       //==========================================================================
   //==========================================================================
   std::set<Package::WeakPointer> 
   Package::mReleasedDynamicallyLoadedPackages;
   //==========================================================================
+
 }