p->CreateHtmlPage(pack_index,"bbtk",pack_name,"","",0,0,false); //true);
}
+
//==========================================================================
int main(int argc, char **argv)
{
- std::string pack("*");
- if (argc==1)
- {
- /*
- // TO DO : make a Wx app
- wxString name = wxGetTextFromUser(_T("Enter package name (* for all)"),
- _T("Regenerate package doc"),
- _T(""));
- if (name.IsEmpty()) return 0;
- pack = bbtk::wx2std(name);
- */
- }
- else if (argc==2)
+ std::string pack("-a");
+ if (argc==1)
+ {
+ /*
+ // TO DO : make a Wx app
+ wxString name = wxGetTextFromUser(_T("Enter package name (* for all)"),
+ _T("Regenerate package doc"),
+ _T(""));
+ if (name.IsEmpty()) return 0;
+ pack = bbtk::wx2std(name);
+ */
+ }
+ else if (argc==2)
+ {
+ pack = std::string(argv[1]);
+ }
+ else
+ {
+ std::cout << "usage : bbRegeneratePackageDoc [<package name>|-a]" << std::endl;
+ return 0;
+ }
+
+ try
+ {
+ std::string doc_path = bbtk::ConfigurationFile::GetInstance().Get_doc_path();
+ doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
+ doc_path += "bbdoc";
+ doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
+
+ bbtk::Interpreter::Pointer I = bbtk::Interpreter::New();
+ I->SetCommandLine(true);
+ I->SetThrow(false);
+ I->InterpretLine( "exec freeze");
+ if (pack != "-a")
{
- pack = std::string(argv[1]);
+ I->InterpretLine( "include "+pack);
+ I->InterpretLine( "include "+pack+"-appli");
+ RegenerateDoc(I->GetExecuter()->GetFactory()->GetPackage(pack),doc_path);
}
- else
+ else
{
- std::cout << "usage : bbRegeneratePackageDoc [package-name]" << std::endl;
- return 0;
+ I->InterpretLine( "include *");
+ bbtk::Factory::PackageMapType::const_iterator i;
+ for (i = I->GetExecuter()->GetFactory()->GetPackageMap().begin();
+ i != I->GetExecuter()->GetFactory()->GetPackageMap().end();
+ ++i)
+ {
+ if (i->second->GetName()=="user") continue;
+ RegenerateDoc(i->second,doc_path);
+ }
}
-
- try
+ }
+ catch (bbtk::Exception e)
{
- std::string doc_path = bbtk::ConfigurationFile::GetInstance().Get_doc_path();
- doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
- doc_path += "bbdoc";
- doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
-
- bbtk::Interpreter::Pointer I = bbtk::Interpreter::New();
- I->SetCommandLine(true);
- I->SetThrow(false);
- I->InterpretLine( "exec freeze");
- I->InterpretLine( "include "+pack);
- if (pack != "*")
- {
- I->InterpretLine( "include "+pack+"-appli");
- RegenerateDoc(I->GetExecuter()->GetFactory()->GetPackage(pack),doc_path);
- }
- else
- {
- bbtk::Factory::PackageMapType::const_iterator i;
- for (i = I->GetExecuter()->GetFactory()->GetPackageMap().begin();
- i != I->GetExecuter()->GetFactory()->GetPackageMap().end();
- ++i)
- {
- RegenerateDoc(i->second,doc_path);
- }
- }
- }
- catch (bbtk::Exception e)
- {
- std::cout << "* ERROR : "<<e.GetErrorMessage()<<std::endl;
- return 1;
- }
- return 0;
+ std::cout << "* ERROR : "<<e.GetErrorMessage()<<std::endl;
+ return 1;
+ }
+ return 0;
}
//==========================================================================
Program: bbtk
Module: $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $
Language: C++
- Date: $Date: 2008/10/08 12:19:56 $
- Version: $Revision: 1.23 $
+ Date: $Date: 2008/10/08 14:46:42 $
+ Version: $Revision: 1.24 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//================================================================
void WxGUIScriptingInterface::OnMenuRegeneratePackageDoc(wxCommandEvent& WXUNUSED(event))
{
- wxString name = wxGetTextFromUser(_T("Enter package name (* for all)"),
- _T("Regenerate package doc"),
- _T(""));
- if (name.IsEmpty()) return;
- std::string pack = bbtk::wx2std(name);
-
- std::string command("cd \"");
- command += ConfigurationFile::GetInstance().Get_bin_path();
- command += "\" && bbRegeneratePackageDoc " + pack;
- bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
-
- if ( ! system ( command.c_str() ) )
- {
- wxMessageBox(_T("Done !"),_T("Regenerate package '")+name+_T("' doc"),
- wxOK | wxICON_INFORMATION);
- }
- else
- {
- wxString err(_T("An error occured while running '"));
- err += bbtk::std2wx(command) + _T("'");
- wxMessageBox(err,_T("Regenerate package doc"),wxOK | wxICON_ERROR);
- }
+ wxString name = wxGetTextFromUser(_T("Enter package name (-a for all)"),
+ _T("Regenerate package doc"),
+ _T(""));
+ if (name.IsEmpty()) return;
+ std::string pack = bbtk::wx2std(name);
+
+ std::string command;
+ command = ConfigurationFile::GetInstance().Get_bin_path();
+ command += ConfigurationFile::GetInstance().Get_file_separator();
+ command += "bbRegeneratePackageDoc " + pack;
+ bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
+
+ if ( ! system ( command.c_str() ) )
+ {
+ wxMessageBox(_T("Done !"),_T("Regenerate package '")+name+_T("' doc"),
+ wxOK | wxICON_INFORMATION);
+ }
+ else
+ {
+ wxString err(_T("An error occured while running '"));
+ err += bbtk::std2wx(command) + _T("'");
+ wxMessageBox(err,_T("Regenerate package doc"),wxOK | wxICON_ERROR);
+ }
}
//================================================================
//================================================================
void WxGUIScriptingInterface::OnMenuRegenerateBoxesLists(wxCommandEvent& WXUNUSED(event))
{
- std::string command("cd \"");
- command += ConfigurationFile::GetInstance().Get_bin_path();
- command += "\" && bbRegenerateBoxesLists";
+ std::string command;
+ command = ConfigurationFile::GetInstance().Get_bin_path();
+ command += ConfigurationFile::GetInstance().Get_file_separator();
+ command += "bbRegenerateBoxesLists";
bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
if ( ! system ( command.c_str() ) )
//================================================================
void WxGUIScriptingInterface::OnMenuRegenerateAll(wxCommandEvent& WXUNUSED(event))
{
- std::string command("cd \"");
- command += ConfigurationFile::GetInstance().Get_bin_path();
- command += "\" && bbRegeneratePackageDoc * && bbRegenerateBoxesLists";
+ std::string command;
+ command = ConfigurationFile::GetInstance().Get_bin_path();
+ command += ConfigurationFile::GetInstance().Get_file_separator();
+ command += "bbRegeneratePackageDoc * && ";
+ command = ConfigurationFile::GetInstance().Get_bin_path();
+ command += ConfigurationFile::GetInstance().Get_file_separator();
+ command += "bbRegenerateBoxesLists";
bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
if ( ! system ( command.c_str() ) )
Program: bbtk
Module: $RCSfile: bbvtkImagePlanes.cxx,v $
Language: C++
- Date: $Date: 2008/10/06 09:39:36 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2008/10/08 14:46:44 $
+ Version: $Revision: 1.7 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bbSetOutputPlaneZ(planeWidgetZ);
picker->UnRegister(NULL);
- planeWidgetX->Register(NULL);
- planeWidgetY->Register(NULL);
- planeWidgetZ->Register(NULL);
+ // planeWidgetX->Register(NULL);
+ // planeWidgetY->Register(NULL);
+ // planeWidgetZ->Register(NULL);
}
//---------------------------------------------------------------------
void ImagePlanes::bbUserDestructor()
{
- planeWidgetX->UnRegister(NULL);//Delete();
- planeWidgetY->UnRegister(NULL);//Delete();
- planeWidgetZ->UnRegister(NULL);//Delete();
+ //planeWidgetX->UnRegister(NULL);//Delete();
+ //planeWidgetY->UnRegister(NULL);//Delete();
+ //planeWidgetZ->UnRegister(NULL);//Delete();
+ planeWidgetX->Delete();
+ planeWidgetY->Delete();
+ planeWidgetZ->Delete();
}
//---------------------------------------------------------------------