X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fappli%2Fbbi%2Fbbi.cxx;h=891ffbfcde3cdda7dbc2799ee9f79a7ed285311e;hb=434f5268c1f4695c68fa407c69159c6d381eabc3;hp=a1984f5e38c532779ee274c60da67e68c1d90697;hpb=0f8f0ec85988476e9857f0091a9fc34953c1d9e6;p=bbtk.git diff --git a/kernel/appli/bbi/bbi.cxx b/kernel/appli/bbi/bbi.cxx index a1984f5..891ffbf 100644 --- a/kernel/appli/bbi/bbi.cxx +++ b/kernel/appli/bbi/bbi.cxx @@ -31,9 +31,9 @@ static const wxCmdLineEntryDesc cmdLineDesc[] = //========================================================================== // Processes the command line parsing result -struct ProcessCmdLine +struct WxProcessCmdLine { - ProcessCmdLine() {} + WxProcessCmdLine() {} void Process(wxCmdLineParser& parser); // int argc; @@ -53,7 +53,7 @@ struct ProcessCmdLine //========================================================================== //========================================================================== -void ProcessCmdLine::Process(wxCmdLineParser& parser) +void WxProcessCmdLine::Process(wxCmdLineParser& parser) { proceed = true; if (parser.Found(_T("D"))) @@ -120,7 +120,7 @@ public: void OnInitCmdLine(wxCmdLineParser& parser); bool OnCmdLineParsed(wxCmdLineParser& parser); - ProcessCmdLine cmd; + WxProcessCmdLine cmd; }; //========================================================================== @@ -151,7 +151,7 @@ bool wxBBIApp::OnCmdLineParsed(wxCmdLineParser& parser) // main frame bool wxBBIApp::OnInit( ) { - // std::cout << "OnInit"<GetInterpreter()->GetExecuter()->GetFactory()->HelpBlackBox("workspace",package,false); + I->GetInterpreter()->GetExecuter()->GetFactory()->PrintHelpDescriptor("workspace",package,false); } /* @@ -202,7 +202,7 @@ bool wxBBIApp::OnInit( ) std::cout << "con="<Close"<Close"<SetNoExecMode(false); std::string package; - I->GetExecuter()->GetFactory()->HelpBlackBox("workspace", - package, - false); + I->GetExecuter()->GetFactory()->PrintHelpDescriptor("workspace", + package, + false); } if (cmdline.input_file.size()==0) I->CommandLineInterpreter(); @@ -288,27 +292,9 @@ int main(int argc, char* argv[]) } else { - // std::cout << "main C"<SetCmdLine(cmdline); - if (wxApp::GetInstance()!=0) - { - std::cout << "WXAPP!!!"<MainLoop(); - //bbtk::Wx::LoopUntilAllWindowsClose(); - */ } - std::cout << "EO main"<2) + int argc; + std::vector argv; + bool console; + bool debug; + bool quiet; + bool help; + bool graphical_dialog; + bool text_dialog; + bool no_console; + bool proceed; + std::map param_map; + std::vector input_file; + +}; + +bool ProcessCmdLine::Found(std::string value) +{ + bool result=false; + for (int i=1; i2) +// { +// std::cout << "usage : "<CommandLineInterpreter(); - } - else - - { - std::string f(argv[1]); - I->InterpretFile(f); - } + { + I->CommandLineInterpreter(); + } else { + + ProcessCmdLine cmd; + cmd.Process(argc,argv); + I->SetInputs(cmd.param_map); + + std::string f(argv[1]); + I->InterpretFile(f); + } - bbtk::Wx::LoopUntilAllWindowsClose(); + // bbtk::Wx::LoopUntilAllWindowsClose(); return 0;