]> Creatis software - bbtk.git/commitdiff
some fixes
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Thu, 14 Feb 2008 13:48:13 +0000 (13:48 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Thu, 14 Feb 2008 13:48:13 +0000 (13:48 +0000)
kernel/src/bbtkTranscriptor.cxx

index 93b2f69d9b188e53027974d8b26fe498776200c4..419fbd5a1098040178e9b96071225eac6490dd9b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkTranscriptor.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/14 11:38:58 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/02/14 13:48:13 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -239,8 +239,8 @@ namespace bbtk
   void Transcriptor::Create ( const std::string& nodeType, 
                               const std::string& nodeName)
   {
-    // Current()->Add(nodeType,nodeName);
-     m_Fp << "e->Add(" << nodeType << ", " <<  nodeName << ");" << std::endl;
+    // Current()->Add(nodeType,nodeName);\"
+     m_Fp << "e->Add("\" << nodeType << "\", \"" <<  nodeName << "\");" << std::endl;
   }
 
 
@@ -262,8 +262,8 @@ namespace bbtk
                           const std::string &inputLabel)
   {
     //Current()->Connect(nodeFrom, outputLabel, nodeTo, inputLabel);
-     m_Fp << "e->Connect("<< nodeFrom << ", " <<  outputLabel << ", "
-          << nodeTo  << ", " << inputLabel<< ");" << std::endl;
+     m_Fp << "e->Connect("<< nodeFrom << "\", \"" <<  outputLabel << "\", \""
+          << nodeTo  << "\", \"" << inputLabel<< "\");" << std::endl;
   }
 
  /**
@@ -276,12 +276,14 @@ namespace bbtk
      {
         if (!mNoExecMode) 
         {
-           Current()->GetPrototype()->bbGetBlackBox(nodeName)->bbExecute(true);
+           //Current()->GetPrototype()->bbGetBlackBox(nodeName)->bbExecute(true);
+           m_Fp << "e->GetPrototype()->bbGetBlackBox("\" << nodeName << "\", true );" << std::endl;
         }
      }
      else 
      {
-        Current()->AddToExecutionList(nodeName) ;
+        //Current()->AddToExecutionList(nodeName) ;
+       m_Fp << "e->AddToExecutionList("\" << nodeName << "\");" << std::endl;
      }
   }
     
@@ -299,8 +301,8 @@ namespace bbtk
        m_Fp << "// ==> Some extra work to do when Current()==mRoot" << std::endl;
 
     }
-       m_Fp << "e->DefineInput("<< name << ", " <<  box << ", "
-          << input << ", " << help << ");" << std::endl;
+       m_Fp << "e->DefineInput(\""<< name << "\", " <<  box << ", "
+            << input << ", \"" << help << "\");" << std::endl;
 
 
   /*
@@ -362,8 +364,8 @@ namespace bbtk
                                  const std::string& help)
   {
    // Current()->DefineOutput(name,box,output,help);
-       m_Fp << "e->DefineOutput("<< name << ", " <<  box << ", "
-          << output << ", " << help << ");" << std::endl;
+       m_Fp << "e->DefineOutput(\""<< name << "\", \"" <<  box << "\", \""
+            << output << "\", \"" << help << "\");" << std::endl;
   }
 
   /**
@@ -459,27 +461,27 @@ namespace bbtk
   {
     //Current()->AddToAuthor(authorName,Current()==mRoot);
     if (Current()==mRoot)    
-       m_Fp << "e->AddToAuthor(" << authorName << ", true)" << std::endl;
+       m_Fp << "e->AddToAuthor(\"" << authorName << "\", true)" << std::endl;
     else
-       m_Fp << "e->AddToAuthor(" << authorName << ", false)" << std::endl;
+       m_Fp << "e->AddToAuthor(\"" << authorName << "\", false)" << std::endl;
   }
 
   void Transcriptor::Category(const std::string &category)
   {           
     //Current()->AddToCategory(category,Current()==mRoot);
     if (Current()==mRoot)    
-       m_Fp << "e->AddToCategory(" << category << ", true)" << std::endl;
+       m_Fp << "e->AddToCategory(\"" << category << "\", true)" << std::endl;
     else
-       m_Fp << "e->AddToCategory(" << category << ", false)" << std::endl;
+       m_Fp << "e->AddToCategory(\"" << category << "\", false)" << std::endl;
   }
 
   void Transcriptor::Description(const std::string &d)
   {
     // Current()->AddToDescription(d,Current()==mRoot);
     if (Current()==mRoot)    
-       m_Fp << "e->AddToDescription(" << d << ", true)" << std::endl;
+       m_Fp << "e->AddToDescription(\"" << d << "\", true)" << std::endl;
     else
-       m_Fp << "e->AddToDescription(" << d << ", false)" << std::endl;    
+       m_Fp << "e->AddToDescription(\"" << d << "\", false)" << std::endl;    
   }