]> Creatis software - bbtk.git/commitdiff
BUG HTML in windows + Cast float int
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Thu, 21 Feb 2008 09:37:23 +0000 (09:37 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Thu, 21 Feb 2008 09:37:23 +0000 (09:37 +0000)
12 files changed:
kernel/src/bbtkConfigurationFile.cxx
kernel/src/bbtkFactory.cxx
kernel/src/bbtkWxBrowser.cxx
kernel/src/bbtkWxBrowser.h
kernel/src/bbtkWxConsole.cxx
packages/itk/doc/bbdoc/header.html.in
packages/std/doc/bbdoc/header.html.in
packages/std/src/bbstdCast.cxx [new file with mode: 0644]
packages/std/src/bbstdCast.h [new file with mode: 0644]
packages/toolsbbtk/doc/bbdoc/header.html.in
packages/vtk/doc/bbdoc/header.html.in
packages/wx/doc/bbdoc/header.html.in

index 811bccbfdca9d6e31dff502cdc27fcd7dcc8f7db..d7806817f50d6c0e4bcc3f4230df76ea5adce7f1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkConfigurationFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/18 10:41:02 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/02/21 09:37:23 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -43,11 +43,12 @@ namespace bbtk
     mFile_separator = "/";
 #endif
     
-    // ==> Set system paths
+    // ==> Set system paths 
     mBin_path = GetExecutablePath();
     mInstall_path = mBin_path + mFile_separator + "..";
     // The relative path to the doc folder (=BBTK_DOC_REL_PATH)
     mDoc_rel_path = BBTK_STRINGIFY_SYMBOL(BBTK_DOC_REL_PATH);
+    mDoc_rel_path = BBTK_STRINGIFY_SYMBOL(doc);
     // The path to the doc folder (=mInstall_path+"/"+mDoc_rel_path)
     mDoc_path = mInstall_path + mFile_separator + mDoc_rel_path;
     // The relative path to the doc folder (=BBTK_BBS_REL_PATH)
index 7cda690e1aaa71d50690300928fefc2d9ef88d46..aa3ee5c2fbc3073d45e7c036de6f89594ca99e43 100644 (file)
@@ -4,8 +4,8 @@ Program:   bbtk
 Module:    $RCSfile: bbtkFactory.cxx,v $
 Language:  C++
 
-Date:      $Date: 2008/02/18 10:41:02 $
-Version:   $Revision: 1.22 $
+Date:      $Date: 2008/02/21 09:37:23 $
+Version:   $Revision: 1.23 $
                                                                                 
 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
@@ -823,7 +823,6 @@ namespace bbtk
   //===================================================================
   void Factory::WriteDotFilePackagesList(FILE *ff)
   {
-printf("EED Factory::WriteDotFilePackagesList 01\n");
 
     bbtkDebugMessageInc("Kernel",9,"Factory::WriteDotFilePackagesList()"
                          <<std::endl);
@@ -844,14 +843,12 @@ printf("EED Factory::WriteDotFilePackagesList 01\n");
     }
     fprintf( ff , "}\n\n");
     bbtkDebugDecTab("Kernel",9);
-printf("EED Factory::WriteDotFilePackagesList 02\n");
   }
   //===================================================================
 
 
  void Factory::ShowGraphTypes(const std::string& name) const
  {
-printf("EED Factory::ShowGraphTypes 01\n");
 
    bool found = false;
    PackageMapType::const_iterator i;
@@ -893,7 +890,6 @@ printf("EED Factory::ShowGraphTypes 01\n");
       bbtkError("No package of the factory contains any black box <"
                 <<name<<">");
    }
-printf("EED Factory::ShowGraphTypes 02\n");
  }
     
 
@@ -1022,6 +1018,11 @@ printf("EED Factory::ShowGraphTypes 02\n");
            s << "<a name=\""<<ii->first<<"\"></a>\n"; 
            s << "<p><a href=\""<<ii->first<<"/index.html\">"
              << ii->first<<"</a>\n"; 
+
+           s << "&nbsp;&nbsp;-&nbsp;&nbsp;\n"; 
+
+           s << "<a name=\"doxygen\"></a>\n"; 
+           s << "<a href=..\\doxygen\\" << ii->first << "/main.html>(Doxygen documentation of the source)</a>\n"; 
          }
        else 
          {
index 708784171c7c03a7894879c6b0fb37058ad173f1..d8112cf1e440b54db65029a2d100502fb70f10aa 100644 (file)
 namespace bbtk
 {  
 
+  //========================================================================
+  enum 
+    {
+      bwd_id,
+      fwd_id,
+      home_id,
+      reload_id,
+      include_id,
+      url_id  ,
+      html_id
+    };
+
+
+/*EED
   //========================================================================
   void WxHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& e)
   {
-    //    std::cout  << "WxHtmlWindow::OnLink"<<std::endl;
+        std::cout  << "WxHtmlWindow::OnLink"<<std::endl;
     //    std::cout  << e.GetHref()<<std::endl;
     LoadPage(e.GetHref());
     if ( ! GetOpenedAnchor().IsEmpty() )
@@ -23,22 +37,11 @@ namespace bbtk
        LoadPage(_T("#"+GetOpenedAnchor()));
       }
     mBrowser->UpdateURL();
-
-
   }
   //========================================================================
+*/
+
 
-  //========================================================================
-  enum 
-    {
-      bwd_id,
-      fwd_id,
-      home_id,
-      reload_id,
-      include_id,
-      url_id,
-      html_id
-    };
   //========================================================================
   
   BEGIN_EVENT_TABLE(WxBrowser, wxPanel)
@@ -65,45 +68,38 @@ namespace bbtk
     
 
     wxBoxSizer *bsizer = new wxBoxSizer(wxHORIZONTAL);
-    
-    sizer->Add ( bsizer, 0, wxGROW );
-    
-    
+        
     mwxBackButton = new wxButton( panel, bwd_id,_T("<"),wxDefaultPosition,
                                  wxDefaultSize,wxBU_EXACTFIT);
-    bsizer->Add ( mwxBackButton, 0, wxALIGN_CENTRE | 
-                 wxLEFT | wxTOP | wxBOTTOM , 10 );
+    bsizer->Add ( mwxBackButton , 0, wxALIGN_CENTRE |  wxLEFT | wxTOP | wxBOTTOM , 10 );
 
     mwxForwardButton = new wxButton( panel, fwd_id,_T(">"),wxDefaultPosition,
                                     wxDefaultSize,wxBU_EXACTFIT);
-    bsizer->Add ( mwxForwardButton, 0, wxALIGN_CENTRE | 
-                 wxTOP | wxBOTTOM , 10);
+    bsizer->Add ( mwxForwardButton  , 0, wxALIGN_CENTRE | wxTOP | wxBOTTOM , 10);
 
-    mwxHomeButton = new wxButton( panel, home_id,_T("~"),wxDefaultPosition,
+    mwxHomeButton = new wxButton( panel, home_id,_T("Home"),wxDefaultPosition,
                                  wxDefaultSize,wxBU_EXACTFIT);
-    bsizer->Add ( mwxHomeButton, 0, wxALIGN_CENTRE | 
-                 wxLEFT | wxTOP | wxBOTTOM , 10 );
+    bsizer->Add ( mwxHomeButton , 0, wxALIGN_CENTRE | wxLEFT | wxTOP | wxBOTTOM , 10  );
     
-    mwxReloadButton = new wxButton( panel, reload_id,_T("."),wxDefaultPosition,
+    mwxReloadButton = new wxButton( panel, reload_id,_T("Reload"),wxDefaultPosition,
                                    wxDefaultSize,wxBU_EXACTFIT);
-    bsizer->Add ( mwxReloadButton, 0, wxALIGN_CENTRE | 
-                 wxTOP | wxBOTTOM , 10 );
+    bsizer->Add ( mwxReloadButton  , 0, wxALIGN_CENTRE |  wxTOP | wxBOTTOM , 10  );
 
     mwxIncludeFileButton = new wxButton( panel, include_id,
-                                      _T("*"),wxDefaultPosition,
+                                      _T("RUN"),wxDefaultPosition,
                                       wxDefaultSize,wxBU_EXACTFIT);
-    bsizer->Add ( mwxIncludeFileButton, 0, wxALIGN_CENTRE | 
-                 wxLEFT | wxTOP | wxBOTTOM , 10 );
+    bsizer->Add ( mwxIncludeFileButton , 0, wxALIGN_CENTRE |  wxLEFT | wxTOP | wxBOTTOM , 10 );
     
     mwxURL = new wxTextCtrl(panel,url_id,_T(""),
                            wxDefaultPosition,
                            wxDefaultSize,
                            wxTE_PROCESS_ENTER);
     mwxURL->SetLabel(_T("URL"));
-    bsizer->Add(mwxURL, 1, wxGROW | wxALL, 10);
+    bsizer->Add(mwxURL, 1, wxEXPAND | wxALL, 10);
 
 
-    mwxHtmlWindow = new WxHtmlWindow(parent,html_id,this,size);
+//    mwxHtmlWindow = new WxHtmlWindow(parent,html_id,this,size);
+    mwxHtmlWindow = new WxHtmlWindow(this,html_id,this,size);
 
     /*
 
@@ -115,23 +111,32 @@ namespace bbtk
     */
     mwxHtmlWindow->SetBorders(5);
     //  mwxHtmlWindow->FitInside();
+
     wxStaticBoxSizer* hw = 
       new wxStaticBoxSizer( new wxStaticBox( this, -1, _T(""),
                                             wxDefaultPosition, 
                                             size ),
                            wxVERTICAL );
-    hw->Add ( mwxHtmlWindow, 1, wxGROW  );
+//EED    hw->Add ( mwxHtmlWindow, 1, wxGROW  );
+    hw->Add ( mwxHtmlWindow, 1, wxEXPAND  );
+
+
+
+
+
     //sizer->Add ( mwxHtmlWindow, 1, wxGROW  );
+//EED    sizer->Add ( hw, 1, wxGROW ); // | wxLEFT | wxRIGHT | wxBOTTOM, 10 );
 
+    sizer->Add ( bsizer , 0, wxEXPAND );
     sizer->Add ( hw, 1, wxGROW ); // | wxLEFT | wxRIGHT | wxBOTTOM, 10 );
-    
+
+
 
     panel      -> SetSizer(sizer);
     panel      -> SetAutoLayout(true);
     panel      -> Layout();
 
-    GoHome();
+//    GoHome();
 
     /*
     Connect( mwxBackButton->GetId(), 
@@ -168,6 +173,7 @@ namespace bbtk
   bool WxBrowser::GoTo(std::string& file)
   { 
     //  std::cout << "goto"<<std::endl;
+
     bool r = mwxHtmlWindow->LoadPage(std2wx(file));
     UpdateURL();
     return r;
@@ -197,6 +203,13 @@ namespace bbtk
   {
     std::string url = ConfigurationFile::GetInstance().Get_doc_path();
     url += "/bbtkWebSite/menu.html";
+       GoTo(url);
+
+    mwxURL->Clear();
+    mwxURL->AppendText(url);
+
+
+/*EED
     if (Utilities::FileExists(url)) 
       {
        GoTo(url);
@@ -205,6 +218,7 @@ namespace bbtk
       {
        // what ?
       }
+*/
   }
   //========================================================================
 
@@ -258,11 +272,12 @@ namespace bbtk
   //======================================================================== 
   void WxBrowser::OnURLEnter( wxCommandEvent&)
   { 
-    //std::cout  << "OnURL"<<std::endl;
+    std::cout  << "OnURL"<<std::endl;
     mwxHtmlWindow->LoadPage(mwxURL->GetValue());
   }
   //========================================================================
   
+
   //========================================================================
   void WxBrowser::OnLinkClicked(wxHtmlLinkEvent& e)
   {
@@ -273,6 +288,7 @@ namespace bbtk
   }
   //========================================================================
 
+
   /*
   void WxBrowser::OnCell(wxHtmlCellEvent& )
   {
index 26238df30e5190fd96494c7552e3d76d548e321e..e074b1c4e1ef8de955530e36b013ff501fc15f27 100644 (file)
@@ -26,7 +26,7 @@ namespace bbtk
      
     }
     //    wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType type,const wxString& url, wxString *redirect);
-    virtual void OnLinkClicked(const wxHtmlLinkInfo& link);
+//EED    virtual void OnLinkClicked(const wxHtmlLinkInfo& link);
 
   private: 
     WxBrowser* mBrowser;
index 943d52a8736d3179926481e02e997fda71274a03..b4b7e3a564e5f5b04df4ac60b8155af0e7b2e57a 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxConsole.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/14 13:44:25 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2008/02/21 09:37:23 $
+  Version:   $Revision: 1.5 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -185,7 +185,8 @@ namespace bbtk
     
     //    wxFlexGridSizer *sizer = new wxFlexGridSizer(1);
     wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
-    
+
+
     mwxNotebook = new wxNotebook(this, -1, 
                                 wxDefaultPosition, wxDefaultSize, 0);
     mwxPageCommand = new wxPanel(mwxNotebook,-1);    
@@ -193,8 +194,9 @@ namespace bbtk
 
     mwxPageHelp = new wxPanel(mwxNotebook,-1);    
     mwxNotebook->AddPage( mwxPageHelp, _T("Help"));
-    
-    sizer->Add ( mwxNotebook, 1, wxGROW | wxALIGN_BOTTOM );
+
+
+    sizer->Add ( mwxNotebook, 1, wxEXPAND /*| wxALIGN_BOTTOM*/ );
     
     wxBoxSizer *cmdsizer = new wxBoxSizer(wxVERTICAL);
     
@@ -211,10 +213,12 @@ namespace bbtk
     helpsizer->SetSizeHints(mwxPageHelp);
    
     mwxHtmlWindow = new WxBrowser(mwxPageHelp,
-                                 wxSize(1200,0));
+//EED                            wxSize(1200,0));
+                                         wxSize(200,0));
 
     //    mwxHtmlWindow->SetSize(wxSize(800,1000));
-    helpsizer->Add (mwxHtmlWindow,  wxALL | wxGROW );
+    helpsizer->Add (mwxHtmlWindow,1,   wxGROW |wxLEFT | wxRIGHT | wxBOTTOM  );
+//    helpsizer->Add ( new wxButton(mwxPageHelp,-1,"perro"), 0,  wxEXPAND  );
   
     //==============
     // Command page 
index 28c72c2880b3cb3e3d2593f32fbadc3bbdffd23e..a38681cc892a3bc7e161ee31e3c75b178c924cfd 100644 (file)
@@ -9,4 +9,4 @@ by <b>@BBTK_PACKAGE_AUTHOR@</b>
 @BBTK_PACKAGE_DESCRIPTION@
 
 <p>
- <a href="../../doxygen/@BBTK_PACKAGE_NAME@/index.html">Doxygen documentation</a> of the source code
+ <a href="../../doxygen/@BBTK_PACKAGE_NAME@/main.html">Doxygen documentation</a> of the source code
index 28c72c2880b3cb3e3d2593f32fbadc3bbdffd23e..a38681cc892a3bc7e161ee31e3c75b178c924cfd 100644 (file)
@@ -9,4 +9,4 @@ by <b>@BBTK_PACKAGE_AUTHOR@</b>
 @BBTK_PACKAGE_DESCRIPTION@
 
 <p>
- <a href="../../doxygen/@BBTK_PACKAGE_NAME@/index.html">Doxygen documentation</a> of the source code
+ <a href="../../doxygen/@BBTK_PACKAGE_NAME@/main.html">Doxygen documentation</a> of the source code
diff --git a/packages/std/src/bbstdCast.cxx b/packages/std/src/bbstdCast.cxx
new file mode 100644 (file)
index 0000000..bd3f94f
--- /dev/null
@@ -0,0 +1,99 @@
+#include "bbstdCast.h"
+#include "bbstdPackage.h"
+
+namespace bbstd 
+{
+  
+  //====================================================================
+  BBTK_USER_BLACK_BOX_TEMPLATE2_IMPLEMENTATION(Cast,
+                                              bbtk::AtomicBlackBox);
+  //====================================================================
+  
+  //====================================================================
+  // Add the instanciated adaptors to the package
+  //typedef unsigned char uchar;
+  
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,double,int8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int8_t,double);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,double,uint8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint8_t,double);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,double,int16_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int16_t,double);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,double,uint16_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint16_t,double);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,double,int32_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int32_t,double);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,double,uint32_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint32_t,double);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,double,float);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,float,double);
+  
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,bool,double);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,double, bool); 
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,bool,float);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,float, bool);    
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,bool,uint32_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint32_t, bool);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,bool,int32_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int32_t, bool);  
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,bool,uint16_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint16_t, bool);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,bool,int16_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int16_t, bool);  
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,bool,uint8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint8_t, bool);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,bool,int8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int8_t, bool);   
+       
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,float,int8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int8_t,float);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,float,uint8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint8_t,float);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,float,int16_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int16_t,float);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,float,uint16_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint16_t,float);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,float,int32_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int32_t,float);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,float,uint32_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint32_t,float);
+  
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int32_t,int8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int8_t,int32_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int32_t,uint8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint8_t,int32_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int32_t,int16_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int16_t,int32_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int32_t,uint16_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint16_t,int32_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int32_t,uint32_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint32_t,int32_t);
+  
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint32_t,int8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int8_t,uint32_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint32_t,uint8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint8_t,uint32_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint32_t,int16_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int16_t,uint32_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint32_t,uint16_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint16_t,uint32_t);
+  
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint16_t,int8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int8_t,uint16_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint16_t,uint8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint8_t,uint16_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint16_t,int16_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int16_t,uint16_t);
+  
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int16_t,int8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int8_t,int16_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int16_t,uint8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint8_t,int16_t);
+  
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,uint8_t,int8_t);
+  BBTK_ADD_TEMPLATE2_BLACK_BOX_TO_PACKAGE(std,Cast,int8_t,uint8_t);
+  
+  //====================================================================
+  
+
+} // namespace bbstd
diff --git a/packages/std/src/bbstdCast.h b/packages/std/src/bbstdCast.h
new file mode 100644 (file)
index 0000000..29b693b
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef __bbstdCast_h_INCLUDED__
+#define __bbstdCast_h_INCLUDED__
+
+#include "bbtkAtomicBlackBox.h"
+
+namespace bbstd 
+{
+  
+  //=================================================================
+  // UserBlackBox declaration
+  template <class T, class U>
+  class Cast : public bbtk::AtomicBlackBox
+  {  
+    BBTK_USER_BLACK_BOX_INTERFACE(Cast,bbtk::AtomicBlackBox);
+    BBTK_DECLARE_INPUT(In,T);
+    BBTK_DECLARE_OUTPUT(Out,U);
+    BBTK_PROCESS(DoIt);
+    void DoIt() {  
+      bbtkDebugMessage("Data",5,"bbstd::Cast In  = "
+                      <<bbGetInputIn()<<" <"<<bbtk::HumanTypeName<T>()
+                      <<">"<<std::endl);
+      bbSetOutputOut( (U)bbGetInputIn() );
+      bbtkDebugMessage("Data",5,"bbstd::Cast Out = "
+                      <<(U)bbGetInputIn()<<" <"<<bbtk::HumanTypeName<U>()
+                      <<">"<<std::endl);
+    }
+  };
+  //=================================================================
+  
+  
+  
+  
+  //=================================================================
+  // UserBlackBox description
+  BBTK_BEGIN_DESCRIBE_TEMPLATE2_BLACK_BOX(Cast);
+  BBTK_NAME("Cast<"+bbtk::TypeName<T1>()+","+bbtk::TypeName<T2>()+">");
+  BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
+  BBTK_DESCRIPTION("Casts a "+bbtk::TypeName<T1>()+" into a "+bbtk::TypeName<T2>());
+  BBTK_DEFAULT_ADAPTOR();
+  BBTK_TEMPLATE2_INPUT(Cast,In,"Input",T1);
+  BBTK_TEMPLATE2_OUTPUT(Cast,Out,"Output",T2);
+  BBTK_END_DESCRIBE_TEMPLATE2_BLACK_BOX(Cast);
+  //=================================================================
+
+
+} // namespace bbstd
+
+#endif // __bbstdCast_h_INCLUDED__
+  
index 28c72c2880b3cb3e3d2593f32fbadc3bbdffd23e..a38681cc892a3bc7e161ee31e3c75b178c924cfd 100644 (file)
@@ -9,4 +9,4 @@ by <b>@BBTK_PACKAGE_AUTHOR@</b>
 @BBTK_PACKAGE_DESCRIPTION@
 
 <p>
- <a href="../../doxygen/@BBTK_PACKAGE_NAME@/index.html">Doxygen documentation</a> of the source code
+ <a href="../../doxygen/@BBTK_PACKAGE_NAME@/main.html">Doxygen documentation</a> of the source code
index 28c72c2880b3cb3e3d2593f32fbadc3bbdffd23e..a38681cc892a3bc7e161ee31e3c75b178c924cfd 100644 (file)
@@ -9,4 +9,4 @@ by <b>@BBTK_PACKAGE_AUTHOR@</b>
 @BBTK_PACKAGE_DESCRIPTION@
 
 <p>
- <a href="../../doxygen/@BBTK_PACKAGE_NAME@/index.html">Doxygen documentation</a> of the source code
+ <a href="../../doxygen/@BBTK_PACKAGE_NAME@/main.html">Doxygen documentation</a> of the source code
index 28c72c2880b3cb3e3d2593f32fbadc3bbdffd23e..a38681cc892a3bc7e161ee31e3c75b178c924cfd 100644 (file)
@@ -9,4 +9,4 @@ by <b>@BBTK_PACKAGE_AUTHOR@</b>
 @BBTK_PACKAGE_DESCRIPTION@
 
 <p>
- <a href="../../doxygen/@BBTK_PACKAGE_NAME@/index.html">Doxygen documentation</a> of the source code
+ <a href="../../doxygen/@BBTK_PACKAGE_NAME@/main.html">Doxygen documentation</a> of the source code