std::string mHName;
std::string mCxxName;
+ void AlertString();
+
};
//==========================================================================
}
//==========================================================================
-
+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);
// process tag given ?
if (BB.nChildNode("process"))
{
- bbtk::GetTextOrClear(BB.getChildNode("process"),mProcess);
+ bbtk::GetTextOrClear(BB.getChildNode("process"),mProcess);
}
// CreateWidget
mess += fullname + "\"";
throw bbfyException(mess);
}
-
+
+ AlertString();
+
// If is widget
if (mIsWidget)
{
}
+ AlertString();
// Inputs
std::vector<IO>::iterator ioi;
throw bbfyException(mess);
}
}
+
// Outputs
for (ioi=mOutput.begin(); ioi!=mOutput.end(); ++ioi)
mFile << " void CreateWidget(wxWindow*);\n";
}
+ AlertString();
// EO black box declaration
mFile << "};\n\n";
{
throw bbfyException("template bb with more than 1 templ param not impl");
}
-
+
+
// Author
mFile << "BBTK_AUTHOR(\""<<mAuthor<< "\");\n";
WriteGenericITKFilterHeader();
}
+ AlertString();
// EO namespace
EndNamespace();
mess += "\"";
throw bbfyException(mess);
}
-
+
+ AlertString();
+
+
// Includes
// Header of the class
mFile << "#include \"" << mHName << "\"\n";
// Process
if ((mType == STD)||(mProcess.size()))
{
+ AlertString();
mFile << "void "<<mName<<"::Process()\n{\n";
mFile << mProcess << "\n";
mFile << "}\n";
// CreateWidget
if (mIsWidget)
{
+ AlertString();
mFile << "void "<<mName<<"::CreateWidget(wxWindow* parent)\n{\n";
mFile << mCreateWidget << "\n";
mFile << "}\n";
// User Set Default Values
+ AlertString();
mFile <<"void "<<mName<<"::bbUserSetDefaultValues()"<<std::endl;
mFile << "{"<<std::endl;
if ( (mType == vtkImageAlgorithm) || (mType == vtkPolyDataAlgorithm) )
mFile << "}" << std::endl;
// User Initialize Processing
+ AlertString();
mFile <<"void "<<mName<<"::bbUserInitializeProcessing()"
<<std::endl;
mFile << "{"<<std::endl;
mFile << "}" << std::endl;
// User Finalize Processing
+ AlertString();
mFile <<"void "<<mName<<"::bbUserFinalizeProcessing()"<<std::endl;
mFile << "{"<<std::endl;
if ( (mType == vtkImageAlgorithm) || (mType == vtkPolyDataAlgorithm) )