]> Creatis software - bbtk.git/blobdiff - kernel/appli/bbfy/bbfy.cpp
*** empty log message ***
[bbtk.git] / kernel / appli / bbfy / bbfy.cpp
index dce426a908dcd6538865332f9e9f692a85630a94..0d7804033d4b412ba4c4c24de1f68afda858c7b1 100644 (file)
@@ -77,6 +77,7 @@ private:
   std::string mTemplateImplementation;
 
   std::vector<std::string> mInclude;
+  std::vector<std::string> mTypedef;
 
   std::string mUserConstructor;
   std::string mUserCopyConstructor;
@@ -326,6 +327,13 @@ void bbfy::ParseXML()
       bbtk::GetTextOrClear(BB.getChildNode("include",&j),val);
       mInclude.push_back(val);
     }
+  // Typedef
+  for (i=0,j=0; i<BB.nChildNode("typedef"); i++) 
+    {
+      std::string val;
+      bbtk::GetTextOrClear(BB.getChildNode("typedef",&j),val);
+      mTypedef.push_back(val);
+    }
   
   // Inputs
   for (i=0,j=0; i<BB.nChildNode("input"); i++) 
@@ -539,6 +547,10 @@ void bbfy::CreateHeader()
       mFile << "  typedef " <<mVtkParent <<" vtkParent;"<<std::endl;
       mFile << "  void bbDelete() { vtkParent::Delete(); }"<<std::endl;
     }
+  for (i=mTypedef.begin(); i!=mTypedef.end(); ++i) 
+    {
+      mFile << *i <<"\n";
+    }
 
   // Declare user constructor / copy cons /destr 
   mFile << "//=================================================================="<<std::endl;
@@ -725,6 +737,11 @@ void bbfy::CreateHeader()
   
   // Category
   mFile << "BBTK_CATEGORY(\""<<mCategory<< "\");\n"; 
+
+  for (i=mTypedef.begin(); i!=mTypedef.end(); ++i) 
+    {
+      mFile << *i <<"\n";
+    }
   
   // Inputs
   for (ioi=mInput.begin(); ioi!=mInput.end(); ++ioi)