//==========================================================================
const std::string itkImageToImageFilterString = "ITK_ImageToImageFilter";
-const std::string vtkImageAlgorithmString = "VTK_ImageAlgorithm";
-const std::string vtkPolyDataAlgorithmString = "VTK_PolyDataAlgorithm";
+const std::string vtkImageAlgorithmString = "VTK_ImageAlgorithm";
+const std::string vtkPolyDataAlgorithmString = "VTK_PolyDataAlgorithm";
//==========================================================================
class bbfy
}
// UserConstructor body
- if (BB.nChildNode("userconstructor"))
+ if (BB.nChildNode("constructor"))
{
- bbtk::GetTextOrClear(BB.getChildNode("userconstructor"),mUserConstructor);
+ bbtk::GetTextOrClear(BB.getChildNode("constructor"),mUserConstructor);
}
+
// UserCopyConstructor body
- if (BB.nChildNode("usercopyconstructor"))
+ if (BB.nChildNode("copyconstructor"))
{
- bbtk::GetTextOrClear(BB.getChildNode("usercopyconstructor"),mUserCopyConstructor);
+ bbtk::GetTextOrClear(BB.getChildNode("copyconstructor"),mUserCopyConstructor);
}
+
// UserDestructor body
- if (BB.nChildNode("userdestructor"))
+ if (BB.nChildNode("destructor"))
{
- bbtk::GetTextOrClear(BB.getChildNode("userdestructor"),mUserDestructor);
+ bbtk::GetTextOrClear(BB.getChildNode("destructor"),mUserDestructor);
}
// Template parameters
{
bbtk::GetTextOrClear(BB.getChildNode("process"),mProcess);
}
+
// CreateWidget
// createwidget tag given ?
if (BB.nChildNode("createwidget"))
// Class declaration and parents
mFile << "class /*BBTK_EXPORT*/ "<<mName<<"\n";
mFile << " : \n";
- mFile << " public "<<mParentBlackBox;
/*
if (mBB.nChildNode("inherits"))
if (mType == itkImageToImageFilter )
{
- mFile << ",\n public " << mItkParent <<"\n";
+ mFile << " public " << mItkParent <<",\n";
}
else if ( (mType == vtkImageAlgorithm) ||
(mType == vtkPolyDataAlgorithm) )
{
- mFile << ",\n public " << mVtkParent <<"\n";
- }
- else
- {
- mFile << "\n";
+ mFile << " public " << mVtkParent <<",\n";
}
+ mFile << " public "<<mParentBlackBox << "\n";
+
mFile << "{\n";
// Interface
mFile << "virtual void bbUserConstructor();"<<std::endl;
mFile << "/// User callback called in the box copy constructor"<<std::endl;
- mFile << "virtual void bbUserCopyConstructor();"<<std::endl;
+ mFile << "virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);"<<std::endl;
mFile << "/// User callback called in the box destructor"<<std::endl;
mFile << "virtual void bbUserDestructor();"<<std::endl;
mFile << "//=================================================================="<<std::endl;
}
}
-
// Process
if ((mType == STD)||(mProcess.size()))
{
if (mIsWidget)
{
mFile << " BBTK_CREATE_WIDGET(CreateWidget);\n" ;
- mFile << " void CreateWidget();\n";
+ mFile << " void CreateWidget(wxWindow*);\n";
}
// EO black box declaration
mFile << "};\n\n";
-
-
// BO black box description
if (mTemplateParam.size()==0)
{
// CreateWidget
if (mIsWidget)
{
- mFile << "void "<<mName<<"::CreateWidget()\n{\n";
+ mFile << "void "<<mName<<"::CreateWidget(wxWindow* parent)\n{\n";
mFile << mCreateWidget << "\n";
mFile << "}\n";
}
-
// User constr / copy constr / destr implementation
mFile <<"void "<<mName<<"::bbUserConstructor()"<<std::endl;
mFile << "{"<<std::endl;
//mFile<<"bbtkDebugMessage(\"Kernel\",9,\""<<mName<<::bbUserConstructor()"<<std::endl);"<<std::endl;
+
mFile << mUserConstructor << std::endl;
mFile << "}" << std::endl;
- mFile <<"void "<<mName<<"::bbUserCopyConstructor()"<<std::endl;
+ mFile <<"void "<<mName<<"::bbUserCopyConstructor(bbtk::BlackBox::Pointer)"
+ <<std::endl;
mFile << "{"<<std::endl;
//mFile<<"bbtkDebugMessage(\"Kernel\",9,\""<<mName<<::bbUserCopyConstructor()"<<std::endl);"<<std::endl;
mFile << mUserCopyConstructor << std::endl;