]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Tue, 10 Nov 2009 08:06:14 +0000 (08:06 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Tue, 10 Nov 2009 08:06:14 +0000 (08:06 +0000)
kernel/appli/bbfy/bbfy.cpp

index 390e5b0ddb8e4e24ebc29469b13a91180da05646..e2bddff2133e48009178f9eb8d23f14ea4558f0b 100644 (file)
@@ -105,6 +105,8 @@ private:
   std::string mHName;
   std::string mCxxName;
 
+  void AlertString();
+
 };
 //==========================================================================
 
@@ -140,11 +142,21 @@ void bbfy::CreateBlackBox()
 }
 //==========================================================================
 
-
+void bbfy::AlertString()
+{
+       
+      mFile << "//===== \n";
+      mFile << "// Don't edit this file. This file is generated from xml description.. \n";
+      mFile << "//===== \n";
+         
+}
 
 //==========================================================================
 void bbfy::ParseXML()
 {
+
+
+
   XMLResults* res = new XMLResults;
   XMLNode BB = XMLNode::parseFile(mFilename.c_str(),"blackbox",res);
 
@@ -426,7 +438,7 @@ void bbfy::ParseXML()
   // process tag given ?
    if (BB.nChildNode("process"))
      {
-       bbtk::GetTextOrClear(BB.getChildNode("process"),mProcess);
+                bbtk::GetTextOrClear(BB.getChildNode("process"),mProcess);
      }
      
   // CreateWidget
@@ -501,7 +513,9 @@ void bbfy::CreateHeader()
       mess += fullname + "\"";
       throw bbfyException(mess);
     }
-  
+
+       AlertString();
+
   // If is widget 
   if (mIsWidget)
     {
@@ -609,6 +623,7 @@ void bbfy::CreateHeader()
     }
 
 
+       AlertString();
 
   // Inputs
   std::vector<IO>::iterator ioi;
@@ -673,6 +688,7 @@ void bbfy::CreateHeader()
          throw bbfyException(mess);
        }
     }
+
   
   // Outputs
   for (ioi=mOutput.begin(); ioi!=mOutput.end(); ++ioi) 
@@ -736,6 +752,7 @@ void bbfy::CreateHeader()
        mFile << "  void CreateWidget(wxWindow*);\n";
     }
 
+       AlertString();
 
   // EO black box declaration
   mFile << "};\n\n";
@@ -763,7 +780,8 @@ void bbfy::CreateHeader()
     {
       throw bbfyException("template bb with more than 1 templ param not impl");
     } 
-  
+
+
   // Author
   mFile << "BBTK_AUTHOR(\""<<mAuthor<< "\");\n";
 
@@ -835,6 +853,7 @@ void bbfy::CreateHeader()
       WriteGenericITKFilterHeader();
     }
 
+       AlertString();
 
   // EO namespace
   EndNamespace();
@@ -999,7 +1018,10 @@ void bbfy::CreateCode()
       mess += "\"";
       throw bbfyException(mess);
     }
-  
+
+       AlertString();
+
+
   // Includes
   // Header of the class
   mFile << "#include \"" << mHName << "\"\n";
@@ -1046,6 +1068,7 @@ void bbfy::CreateCode()
   // Process
   if ((mType == STD)||(mProcess.size()))
     {
+       AlertString();
       mFile << "void "<<mName<<"::Process()\n{\n";
       mFile << mProcess << "\n";
       mFile << "}\n";
@@ -1053,6 +1076,7 @@ void bbfy::CreateCode()
   // CreateWidget
   if (mIsWidget)
     {
+       AlertString();
       mFile << "void "<<mName<<"::CreateWidget(wxWindow* parent)\n{\n";
       mFile << mCreateWidget << "\n";
       mFile << "}\n";
@@ -1060,6 +1084,7 @@ void bbfy::CreateCode()
 
                
   // User Set Default Values  
+       AlertString();
   mFile <<"void "<<mName<<"::bbUserSetDefaultValues()"<<std::endl;
   mFile << "{"<<std::endl;  
        if ( (mType == vtkImageAlgorithm) || (mType == vtkPolyDataAlgorithm) )
@@ -1070,6 +1095,7 @@ void bbfy::CreateCode()
   mFile << "}" << std::endl;
 
   // User Initialize Processing
+       AlertString();
   mFile <<"void "<<mName<<"::bbUserInitializeProcessing()"
        <<std::endl;
   mFile << "{"<<std::endl;
@@ -1081,6 +1107,7 @@ void bbfy::CreateCode()
   mFile << "}" << std::endl;
 
        // User Finalize Processing
+       AlertString();
   mFile <<"void "<<mName<<"::bbUserFinalizeProcessing()"<<std::endl;
   mFile << "{"<<std::endl;
        if ( (mType == vtkImageAlgorithm) || (mType == vtkPolyDataAlgorithm) )