X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fappli%2Fbbfy%2Fbbfy.cpp;h=390e5b0ddb8e4e24ebc29469b13a91180da05646;hb=f45b7f05b03f411759981fe13645466a1c289e6a;hp=58407a5699490cbe899703f05e54fd47faea1b36;hpb=c082b461654d7c78383c752202f19ad0316e3f00;p=bbtk.git diff --git a/kernel/appli/bbfy/bbfy.cpp b/kernel/appli/bbfy/bbfy.cpp index 58407a5..390e5b0 100644 --- a/kernel/appli/bbfy/bbfy.cpp +++ b/kernel/appli/bbfy/bbfy.cpp @@ -63,7 +63,7 @@ private: bool mIsWidget; std::string mParentBlackBox; std::string mItkParent; - std::string mVtkParent; + std::string mVtkObject; bool mGeneric; std::string mAuthor; std::string mDescription; @@ -79,9 +79,9 @@ private: std::vector mInclude; std::vector mTypedef; - std::string mUserConstructor; - std::string mUserCopyConstructor; - std::string mUserDestructor; + std::string mUserSetDefaultValues; + std::string mUserInitializeProcessing; + std::string mUserFinalizeProcessing; typedef struct { @@ -196,27 +196,27 @@ void bbfy::ParseXML() else if (bbtype == vtkImageAlgorithmString) { mType = vtkImageAlgorithm; - // Looks for tag - if (!BB.nChildNode("vtkparent")) + // Looks for tag + if (!BB.nChildNode("vtkobject")) { throw bbfyException("Error : blackbox type '" +vtkImageAlgorithmString - +"' but no tag found (mandatory)"); + +"' but no tag found (mandatory)"); } - bbtk::GetTextOrClear(BB.getChildNode("vtkparent"),mVtkParent); + bbtk::GetTextOrClear(BB.getChildNode("vtkobject"),mVtkObject); // } else if (bbtype == vtkPolyDataAlgorithmString ) { mType = vtkPolyDataAlgorithm; - // Looks for tag - if (!BB.nChildNode("vtkparent")) + // Looks for tag + if (!BB.nChildNode("vtkobject")) { throw bbfyException("Error : blackbox type '" +vtkPolyDataAlgorithmString - +"' but no tag found (mandatory)"); + +"' but no tag found (mandatory)"); } - bbtk::GetTextOrClear(BB.getChildNode("vtkparent"),mVtkParent); + bbtk::GetTextOrClear(BB.getChildNode("vtkobject"),mVtkObject); // } else @@ -276,25 +276,30 @@ void bbfy::ParseXML() bbtk::GetTextOrClear(BB.getChildNode("namespace"),mNamespace); } - // UserConstructor body - if (BB.nChildNode("constructor")) + // UserSetDefaultValues body + if (BB.nChildNode("defaultValues")) { - bbtk::GetTextOrClear(BB.getChildNode("constructor"),mUserConstructor); + bbtk::GetTextOrClear(BB.getChildNode("defaultValues"), + mUserSetDefaultValues); } - // UserCopyConstructor body - if (BB.nChildNode("copyconstructor")) + // UserInitializeProcessing body + if (BB.nChildNode("initializeProcessing")) { - bbtk::GetTextOrClear(BB.getChildNode("copyconstructor"),mUserCopyConstructor); + bbtk::GetTextOrClear(BB.getChildNode("initializeProcessing"), + mUserInitializeProcessing); } - // UserDestructor body - if (BB.nChildNode("destructor")) + // UserFinalizeProcessing body + if (BB.nChildNode("finalizeProcessing")) { - bbtk::GetTextOrClear(BB.getChildNode("destructor"),mUserDestructor); + bbtk::GetTextOrClear(BB.getChildNode("finalizeProcessing"), + mUserFinalizeProcessing); } - - // Template parameters + + + + // Template parameters // mNbTemplateParam = BB.nChildNode("template"); if ( BB.nChildNode("template") > 0) @@ -430,6 +435,30 @@ void bbfy::ParseXML() { bbtk::GetTextOrClear(BB.getChildNode("createwidget"),mCreateWidget); } + + + + + + + + // OBSOLETE/UNSUPPORTED TAGS + // WARN IF OBSOLETE TAGS PROVIDED + if (BB.nChildNode("constructor")) + { + std::cout << "WARNING !!! The tag is obsolete !!"< is obsolete !!"< is obsolete !!"<::iterator i; for (i=mInclude.begin(); i!=mInclude.end(); ++i) { @@ -516,7 +545,7 @@ void bbfy::CreateHeader() } // Class declaration and parents - mFile << "class /*BBTK_EXPORT*/ "<