2 #define _CRT_SECURE_NO_DEPRECATE
12 //==========================================================================
16 bbfyException(const std::string& message) : mMessage(message) {}
20 //==========================================================================
22 const std::string itkImageToImageFilterString = "ITK_ImageToImageFilter";
23 const std::string vtkImageAlgorithmString = "VTK_ImageAlgorithm";
24 const std::string vtkPolyDataAlgorithmString = "VTK_PolyDataAlgorithm";
26 //==========================================================================
30 bbfy(const std::string& filename,
31 const std::string& package = "PACKAGE_NAME",
32 const std::string& output_path = "",
33 bool verbose = false);
35 void CreateBlackBox();
40 void WriteGenericITKFilterHeader();
42 void BeginNamespace();
47 std::string mFilename;
48 std::string mOutputPath;
56 itkImageToImageFilter,
64 std::string mParentBlackBox;
65 std::string mItkParent;
66 std::string mVtkParent;
69 std::string mDescription;
70 std::string mCategory;
72 // bool mIsInNamespace;
73 std::string mNamespace;
74 // int mNbTemplateParam;
75 std::vector<std::string> mTemplateParam;
76 std::string mTemplateDeclaration;
77 std::string mTemplateImplementation;
79 std::vector<std::string> mInclude;
80 std::vector<std::string> mTypedef;
82 std::string mUserConstructor;
83 std::string mUserCopyConstructor;
84 std::string mUserDestructor;
92 std::string generic_type;
96 std::vector<IO> mInput;
97 std::vector<IO> mOutput;
100 std::string mCreateWidget;
105 std::string mCxxName;
108 //==========================================================================
112 //==========================================================================
113 bbfy::bbfy(const std::string& filename,
114 const std::string& package,
115 const std::string& output_path,
120 mFilename = filename;
122 mNamespace = "bb" + mPackage;
124 mOutputPath = output_path;
129 //==========================================================================
131 //==========================================================================
132 void bbfy::CreateBlackBox()
134 // Parse XML input file
136 // Create output files
140 //==========================================================================
144 //==========================================================================
145 void bbfy::ParseXML()
147 XMLResults* res = new XMLResults;
148 XMLNode BB = XMLNode::parseFile(mFilename.c_str(),"blackbox",res);
150 if ( res->error != eXMLErrorNone )
152 std::ostringstream str;
153 str << XMLNode::getError(res->error);
154 str << " [line " << res->nLine << ", col "<<res->nColumn<<"]";
156 throw bbfyException(str.str());
161 if (!BB.isAttributeSet("name"))
163 throw bbfyException("Error : <blackbox> tag : no 'name' attribute found (mandatory)");
165 mName = BB.getAttribute("name");
167 if (mVerbose) std::cout << "* Creating BlackBox '"<<mName<<"'"<<std::endl;
174 if (BB.isAttributeSet("type"))
176 std::string bbtype = BB.getAttribute("type");
177 if (bbtype=="standard")
182 else if (bbtype==itkImageToImageFilterString)
184 mType = itkImageToImageFilter;
185 // Looks for <itkparent> tag
186 if (!BB.nChildNode("itkparent"))
188 throw bbfyException("Error : blackbox type '"+itkImageToImageFilterString+"' but no <itkparent> tag found (mandatory)");
190 bbtk::GetTextOrClear(BB.getChildNode("itkparent"),mItkParent);
193 if (BB.isAttributeSet("generic")) mGeneric=true;
195 else if (bbtype == vtkImageAlgorithmString)
197 mType = vtkImageAlgorithm;
198 // Looks for <vtkparent> tag
199 if (!BB.nChildNode("vtkparent"))
201 throw bbfyException("Error : blackbox type '"
202 +vtkImageAlgorithmString
203 +"' but no <vtkparent> tag found (mandatory)");
205 bbtk::GetTextOrClear(BB.getChildNode("vtkparent"),mVtkParent);
208 else if (bbtype == vtkPolyDataAlgorithmString )
210 mType = vtkPolyDataAlgorithm;
211 // Looks for <vtkparent> tag
212 if (!BB.nChildNode("vtkparent"))
214 throw bbfyException("Error : blackbox type '"
215 +vtkPolyDataAlgorithmString
216 +"' but no <vtkparent> tag found (mandatory)");
218 bbtk::GetTextOrClear(BB.getChildNode("vtkparent"),mVtkParent);
223 std::string mess("Error : blackbox type '");
225 mess += "' unknown. Known types :";
226 mess += "'" + itkImageToImageFilterString + "' ";
227 mess += "'" + vtkImageAlgorithmString + "' ";
228 mess += "'" + vtkPolyDataAlgorithmString + "' ";
229 throw bbfyException(mess);
234 if (BB.isAttributeSet("widget"))
237 mParentBlackBox = "bbtk::WxBlackBox";
238 mInclude.push_back("bbtkWxBlackBox.h");
243 mParentBlackBox = "bbtk::AtomicBlackBox";
244 mInclude.push_back("bbtkAtomicBlackBox.h");
249 for (i=0,j=0; i<BB.nChildNode("author"); i++)
252 bbtk::GetTextOrClear(BB.getChildNode("author",&j),val);
257 for (i=0,j=0; i<BB.nChildNode("description"); i++)
260 bbtk::GetTextOrClear(BB.getChildNode("description",&j),val);
265 for (i=0,j=0; i<BB.nChildNode("category"); i++)
268 bbtk::GetTextOrClear(BB.getChildNode("category",&j),val);
273 if (BB.nChildNode("namespace"))
275 bbtk::GetTextOrClear(BB.getChildNode("namespace"),mNamespace);
278 // UserConstructor body
279 if (BB.nChildNode("userconstructor"))
281 bbtk::GetTextOrClear(BB.getChildNode("userconstructor"),mUserConstructor);
283 // UserCopyConstructor body
284 if (BB.nChildNode("usercopyconstructor"))
286 bbtk::GetTextOrClear(BB.getChildNode("usercopyconstructor"),mUserCopyConstructor);
288 // UserDestructor body
289 if (BB.nChildNode("userdestructor"))
291 bbtk::GetTextOrClear(BB.getChildNode("userdestructor"),mUserDestructor);
294 // Template parameters
295 // mNbTemplateParam = BB.nChildNode("template");
297 if ( BB.nChildNode("template") > 0)
299 mTemplateDeclaration = "<";
300 mTemplateImplementation = "<";
302 for (i=0,j=0; i<BB.nChildNode("template")-1; i++)
304 mTemplateDeclaration += "class ";
306 bbtk::GetTextOrClear(BB.getChildNode("template",&j),val);
307 mTemplateDeclaration += val;
308 mTemplateDeclaration += ",";
309 mTemplateImplementation += val;
310 mTemplateImplementation += ",";
311 mTemplateParam.push_back(val);
313 mTemplateDeclaration += "class ";
315 bbtk::GetTextOrClear(BB.getChildNode("template",&j),val);
316 mTemplateDeclaration += val;
317 mTemplateDeclaration += ">";
318 mTemplateImplementation += val;
319 mTemplateImplementation += ">";
320 mTemplateParam.push_back(val);
324 for (i=0,j=0; i<BB.nChildNode("include"); i++)
327 bbtk::GetTextOrClear(BB.getChildNode("include",&j),val);
328 mInclude.push_back(val);
331 for (i=0,j=0; i<BB.nChildNode("typedef"); i++)
334 bbtk::GetTextOrClear(BB.getChildNode("typedef",&j),val);
335 mTypedef.push_back(val);
339 for (i=0,j=0; i<BB.nChildNode("input"); i++)
342 XMLNode n = BB.getChildNode("input",&j);
343 if (!n.isAttributeSet("name"))
345 throw bbfyException("Error : <input> attribute 'name' not found (mandatory)");
347 io.name = n.getAttribute("name");
348 if (!n.isAttributeSet("type"))
350 throw bbfyException("Error : <input name=\""+io.name+"\"> attribute 'type' not found (mandatory)");
352 io.type = n.getAttribute("type");
353 if (!n.isAttributeSet("description"))
355 throw bbfyException("Error : <input name=\""+io.name+"\"> attribute 'description' not found (mandatory)");
357 io.descr = n.getAttribute("description");
359 if (n.isAttributeSet("special"))
361 io.special = n.getAttribute("special");
364 if (n.isAttributeSet("generic_type"))
366 io.generic_type = n.getAttribute("generic_type");
369 mInput.push_back(io);
373 for (i=0,j=0; i<BB.nChildNode("output"); i++)
376 XMLNode n = BB.getChildNode("output",&j);
377 if (!n.isAttributeSet("name"))
379 throw bbfyException("Error : <output> attribute 'name' not found (mandatory)");
381 io.name = n.getAttribute("name");
382 if (!n.isAttributeSet("type"))
384 throw bbfyException("Error : <output name=\""+io.name+"\"> attribute 'type' not found (mandatory)");
386 io.type = n.getAttribute("type");
387 if (!n.isAttributeSet("description"))
389 throw bbfyException("Error : <output name=\""+io.name+"\"> attribute 'description' not found (mandatory)");
391 io.descr = n.getAttribute("description");
393 if (n.isAttributeSet("special"))
395 io.special = n.getAttribute("special");
398 if (n.isAttributeSet("generic_type"))
400 io.generic_type = n.getAttribute("generic_type");
403 mOutput.push_back(io);
408 // process tag given ?
409 if (BB.nChildNode("process"))
411 bbtk::GetTextOrClear(BB.getChildNode("process"),mProcess);
414 // createwidget tag given ?
415 if (BB.nChildNode("createwidget"))
417 bbtk::GetTextOrClear(BB.getChildNode("createwidget"),mCreateWidget);
420 //==========================================================================
423 //==========================================================================
424 void bbfy::BeginNamespace()
426 // if (mIsInNamespace)
428 mFile << "namespace "<<mNamespace <<"\n{\n\n";
431 //==========================================================================
433 //==========================================================================
434 void bbfy::EndNamespace()
436 // if (mIsInNamespace)
438 mFile << "}\n// EO namespace "<<mNamespace<<"\n\n";
441 //==========================================================================
444 //==========================================================================
445 void bbfy::CreateHeader()
452 if (mVerbose) std::cout << " - Creating header '"<<mHName<<"'"<<std::endl;
453 std::string fullname = mOutputPath + mHName;
454 mFile.open(fullname.c_str());
457 std::string mess("Error : could not open file \"");
458 mess += fullname + "\"";
459 throw bbfyException(mess);
465 mFile << "#ifdef _USE_WXWIDGETS_\n";
468 // Prevent multiple inclusions
469 std::string included("__bb");
470 included += mPackage + mName + "_h_INCLUDED__";
471 mFile << "#ifndef " << included <<"\n";
472 mFile << "#define " << included <<"\n";
475 // mFile << "#include \"bbtkAtomicBlackBox.h\"\n";
476 std::vector<std::string>::iterator i;
477 for (i=mInclude.begin(); i!=mInclude.end(); ++i)
479 mFile << "#include \"" << *i <<"\"\n";
481 if (mGeneric) mFile << "#include \"bbitkImage.h\"\n";
489 // If it is a template class
490 if (mTemplateParam.size() > 0)
492 mFile << "template " << mTemplateDeclaration <<"\n";
495 // Class declaration and parents
496 mFile << "class /*BBTK_EXPORT*/ "<<mName<<"\n";
498 mFile << " public "<<mParentBlackBox;
501 if (mBB.nChildNode("inherits"))
504 for (i=0,j=0; i<mBB.nChildNode("inherits")-1; i++)
507 << mBB.getChildNode("inherits",&j).getText()
511 << mBB.getChildNode("Inherits",&j).getText()
516 if (mType == itkImageToImageFilter )
518 mFile << ",\n public " << mItkParent <<"\n";
520 else if ( (mType == vtkImageAlgorithm) ||
521 (mType == vtkPolyDataAlgorithm) )
523 mFile << ",\n public " << mVtkParent <<"\n";
533 mFile << " BBTK_USER_BLACK_BOX_INTERFACE("
535 << mParentBlackBox << ");\n";
537 // typedef on itkfilter
538 if (mType == itkImageToImageFilter)
540 mFile << " typedef " <<mItkParent <<" itkParent;"<<std::endl;
541 mFile << " void bbDelete() { itkParent::UnRegister(); }"<<std::endl;
543 // typedef on itkfilter
544 if ( (mType == vtkImageAlgorithm) ||
545 (mType == vtkPolyDataAlgorithm) )
547 mFile << " typedef " <<mVtkParent <<" vtkParent;"<<std::endl;
548 mFile << " void bbDelete() { vtkParent::Delete(); }"<<std::endl;
550 for (i=mTypedef.begin(); i!=mTypedef.end(); ++i)
555 // Declare user constructor / copy cons /destr
556 mFile << "//=================================================================="<<std::endl;
557 mFile << "/// User callback called in the box contructor"<<std::endl;
559 mFile << "virtual void bbUserConstructor();"<<std::endl;
560 mFile << "/// User callback called in the box copy constructor"<<std::endl;
561 mFile << "virtual void bbUserCopyConstructor();"<<std::endl;
562 mFile << "/// User callback called in the box destructor"<<std::endl;
563 mFile << "virtual void bbUserDestructor();"<<std::endl;
564 mFile << "//=================================================================="<<std::endl;
569 std::vector<IO>::iterator ioi;
570 for (ioi=mInput.begin(); ioi!=mInput.end(); ++ioi)
572 if (ioi->special=="")
574 mFile << " BBTK_DECLARE_INPUT("
580 else if (ioi->special=="itk input")
582 mFile << " BBTK_DECLARE_ITK_INPUT("
589 else if (ioi->special=="vtk input")
591 if (mType == vtkImageAlgorithm) {
592 mFile << " BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT("
599 else if (mType == vtkPolyDataAlgorithm) {
600 mFile << " BBTK_DECLARE_POLY_DATA_ALGORITHM_INPUT("
608 else if (ioi->special=="itk parameter")
610 mFile << " BBTK_DECLARE_ITK_PARAM("
617 else if (ioi->special=="vtk parameter")
619 mFile << " BBTK_DECLARE_VTK_PARAM("
628 std::string mess("Error : input '");
630 mess += "', 'special' attribute '";
631 mess += ioi->special;
633 throw bbfyException(mess);
638 for (ioi=mOutput.begin(); ioi!=mOutput.end(); ++ioi)
640 if (ioi->special=="")
642 mFile << " BBTK_DECLARE_OUTPUT("
648 else if (ioi->special=="itk output")
650 mFile << " BBTK_DECLARE_ITK_OUTPUT("
657 else if (ioi->special=="vtk output")
659 mFile << " BBTK_DECLARE_VTK_OUTPUT("
668 std::string mess("Error : output '");
670 mess += "', 'special' attribute '";
671 mess += ioi->special;
673 throw bbfyException(mess);
679 if ((mType == STD)||(mProcess.size()))
681 mFile << " BBTK_PROCESS(Process);\n" ;
682 mFile << " void Process();\n";
684 else if (mType == itkImageToImageFilter)
686 mFile << " BBTK_PROCESS(itkParent::Update);\n" ;
688 else if ((mType == vtkImageAlgorithm) ||
689 (mType == vtkPolyDataAlgorithm) )
692 mFile << " BBTK_PROCESS(vtkParent::Update);\n" ;
698 mFile << " BBTK_CREATE_WIDGET(CreateWidget);\n" ;
699 mFile << " void CreateWidget();\n";
703 // EO black box declaration
708 // BO black box description
709 if (mTemplateParam.size()==0)
711 mFile << "BBTK_BEGIN_DESCRIBE_BLACK_BOX("
713 << mParentBlackBox << ");\n";
714 mFile << "BBTK_NAME(\"" << mName <<"\");\n";
716 else if (mTemplateParam.size()==1)
718 mFile << "BBTK_BEGIN_DESCRIBE_TEMPLATE_BLACK_BOX("
720 //<< mParentBlackBox //<< ","
721 // << mTemplateParam[0]
723 mFile << "BBTK_NAME(\"" << mName
724 << "<\"+bbtk::TypeName<" << mTemplateParam[0]
729 throw bbfyException("template bb with more than 1 templ param not impl");
733 mFile << "BBTK_AUTHOR(\""<<mAuthor<< "\");\n";
736 mFile << "BBTK_DESCRIPTION(\""<<mDescription<< "\");\n";
739 mFile << "BBTK_CATEGORY(\""<<mCategory<< "\");\n";
741 for (i=mTypedef.begin(); i!=mTypedef.end(); ++i)
747 for (ioi=mInput.begin(); ioi!=mInput.end(); ++ioi)
749 if (mTemplateParam.size()>0)
751 mFile << "BBTK_TEMPLATE_INPUT(";
755 mFile << "BBTK_INPUT(";
757 mFile << mName << "," << ioi->name << ",\""
758 << ioi->descr << "\"," << ioi->type <<");\n";
762 for (ioi=mOutput.begin(); ioi!=mOutput.end(); ++ioi)
764 if (mTemplateParam.size()>0)
766 mFile << "BBTK_TEMPLATE_OUTPUT(";
770 mFile << "BBTK_OUTPUT(";
772 mFile << mName << "," << ioi->name << ",\""
773 << ioi->descr << "\"," << ioi->type <<");\n";
776 // EO black box description
777 if (mTemplateParam.size()==0)
779 mFile << "BBTK_END_DESCRIBE_BLACK_BOX("
782 else if (mTemplateParam.size()==1)
784 mFile << "BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX("
786 // << mTemplateParam[0]
791 throw bbfyException("template bb with more than 1 templ param not impl");
795 // Untemplatization of itk filters
798 WriteGenericITKFilterHeader();
805 // Prevent multiple inclusions
806 mFile << "#endif // " << included <<"\n";
810 mFile << "#endif // _USE_WXWIDGETS_\n";
818 //==========================================================================
822 //==========================================================================
823 void bbfy::WriteGenericITKFilterHeader()
825 mFile << "\n//===================================================\n";
826 mFile << "// Generic \"untemplatized\" filter\n";
827 mFile << "//===================================================\n";
829 // Class declaration and parents
830 mFile << "class /*BBTK_EXPORT*/ "<<mName<<"Generic\n";
832 mFile << " public bbtk::AtomicBlackBox\n";
836 mFile << " BBTK_USER_BLACK_BOX_INTERFACE("
837 << mName << "Generic,bbtk::AtomicBlackBox);\n";
840 std::vector<IO>::iterator ioi;
841 for (ioi=mInput.begin(); ioi!=mInput.end(); ++ioi)
843 mFile << " BBTK_DECLARE_INPUT("
851 for (ioi=mOutput.begin(); ioi!=mOutput.end(); ++ioi)
853 mFile << " BBTK_DECLARE_OUTPUT("
861 mFile << " BBTK_PROCESS(ProcessSwitch);\n";
862 mFile << " private :\n";
863 mFile << " inline void ProcessSwitch();\n";
864 mFile << " template <class T, unsigned int D> void Process();\n";
865 // EO black box declaration
870 // BO black box description
871 mFile << "BBTK_BEGIN_DESCRIBE_BLACK_BOX("
872 << mName << "Generic,bbtk::AtomicBlackBox);\n";
873 mFile << "BBTK_NAME(\"" << mName <<"\");\n";
876 mFile << "BBTK_AUTHOR(\""<<mAuthor<< "\");\n";
879 mFile << "BBTK_DESCRIPTION(\""<<mDescription<< "\");\n";
882 for (ioi=mInput.begin(); ioi!=mInput.end(); ++ioi)
884 mFile << "BBTK_INPUT(";
885 mFile << mName << "Generic," << ioi->name << ",\""
886 << ioi->descr << "\"," << ioi->generic_type <<");\n";
890 for (ioi=mOutput.begin(); ioi!=mOutput.end(); ++ioi)
892 mFile << "BBTK_OUTPUT(";
893 mFile << mName << "Generic," << ioi->name << ",\""
894 << ioi->descr << "\"," << ioi->generic_type <<");\n";
897 // EO black box description
898 mFile << "BBTK_END_DESCRIBE_BLACK_BOX("
899 << mName << "Generic);\n";
902 //=================================================================
903 // ProcessSwitch implementation
904 mFile << "void "<< mName <<"Generic::ProcessSwitch()\n"
906 << "CALL_FOR_ALL_TYPES_AND_DIM(bbGetInputIn()->GetType(),\n"
907 << " bbGetInputIn()->GetDimension(),\n"
910 //=================================================================
913 //=================================================================
914 // Template process implementation
915 mFile << "template <class T, unsigned int D>\n"
916 << "void "<<mName<<"Generic::Process()\n"
918 << " bbtkDebugMessageInc(\"Kernel\",9,\n"
920 << "Generic::Process<\"<<TypeName<T>()<<\",\"<<D<<\">()\"<<std::endl);\n"
922 << " typedef itk::Image<T,D> ImageType;\n"
923 << " typedef "<<mName<<"<ImageType> FilterType;\n"
925 << " FilterType* f = new FilterType(\"Temp\");\n"
927 << " f->bbSetInputIn( this->bbGetInputIn()->GetImage<T,D>() );\n";
929 for (ioi=mInput.begin(); ioi!=mInput.end(); ++ioi)
931 if (ioi->name == "In") continue;
932 mFile << " f->bbSetInput"<<ioi->name<<" ( this->bbGetInput"
933 << ioi->name << "() );\n";
936 mFile << " f->bbUpdate();\n"
937 << " this->bbSetOutputOut( new itkImage( f->bbGetOutputOut() ) );\n"
938 << " f->UnRegister();\n"
939 << " bbtkDebugDecTab(\"Kernel\",9);\n"
941 //=================================================================
945 //==========================================================================
948 //==========================================================================
949 void bbfy::CreateCode()
952 mCxxName += mPackage;
955 if (mVerbose) std::cout << " - Creating code '"<<mCxxName<<"'"<<std::endl;
956 std::string fullname = mOutputPath + mCxxName;
957 mFile.open(fullname.c_str());
960 std::string mess("Error : could not open file \"");
963 throw bbfyException(mess);
967 // Header of the class
968 mFile << "#include \"" << mHName << "\"\n";
970 // Include Package header
971 mFile << "#include \"bb"<<mPackage << "Package.h\"\n";
978 if (mTemplateParam.size()>0)
981 mFile << "BBTK_USER_BLACK_BOX_TEMPLATE_IMPLEMENTATION("
983 << mParentBlackBox << ");\n";
988 mFile << "BBTK_USER_BLACK_BOX_IMPLEMENTATION("
989 << mName << "Generic,bbtk::AtomicBlackBox);\n";
991 mFile << "BBTK_ADD_BLACK_BOX_TO_PACKAGE("
993 << mName << "Generic)\n";
998 // Non template class
1000 mFile << "BBTK_ADD_BLACK_BOX_TO_PACKAGE("
1005 mFile << "BBTK_USER_BLACK_BOX_IMPLEMENTATION("
1007 << mParentBlackBox << ");\n";
1010 if ((mType == STD)||(mProcess.size()))
1012 mFile << "void "<<mName<<"::Process()\n{\n";
1013 mFile << mProcess << "\n";
1019 mFile << "void "<<mName<<"::CreateWidget()\n{\n";
1020 mFile << mCreateWidget << "\n";
1025 // User constr / copy constr / destr implementation
1026 mFile <<"void "<<mName<<"::bbUserConstructor()"<<std::endl;
1027 mFile << "{"<<std::endl;
1028 //mFile<<"bbtkDebugMessage(\"Kernel\",9,\""<<mName<<::bbUserConstructor()"<<std::endl);"<<std::endl;
1029 mFile << mUserConstructor << std::endl;
1030 mFile << "}" << std::endl;
1032 mFile <<"void "<<mName<<"::bbUserCopyConstructor()"<<std::endl;
1033 mFile << "{"<<std::endl;
1034 //mFile<<"bbtkDebugMessage(\"Kernel\",9,\""<<mName<<::bbUserCopyConstructor()"<<std::endl);"<<std::endl;
1035 mFile << mUserCopyConstructor << std::endl;
1036 mFile << "}" << std::endl;
1038 mFile <<"void "<<mName<<"::bbUserDestructor()"<<std::endl;
1039 mFile << "{"<<std::endl;
1040 //mFile<<"bbtkDebugMessage(\"Kernel\",9,\""<<mName<<::bbUserDestructor()"<<std::endl);"<<std::endl;
1041 mFile << mUserDestructor << std::endl;
1042 mFile << "}" << std::endl;
1054 //==========================================================================
1060 //==========================================================================
1061 int main(int argc, char **argv)
1064 if (argc<2 || argc>5)
1066 std::cerr << "usage : "<< argv[0] <<" xml_file [package_name] [output_path] [-q]" << std::endl;
1072 std::string package("PACKAGE_NAME");
1073 std::string output_path("");
1074 bool verbose = true;
1075 if (argc>2) package = argv[2];
1076 if (argc>3) output_path = argv[3];
1077 if (argc>4) verbose = false;
1079 bbfy B(argv[1],package,output_path,verbose);
1081 catch (bbfyException e)
1083 std::cerr << argv[0] << " " << argv[1] << std::endl
1084 << e.mMessage << std::endl;
1089 //==========================================================================