/** Ouptut a bonmin.opt file with options default values and short descritpions.*/ void RegisteredOptions::writeBonminOpt(std::ostream &os, ExtraCategoriesInfo which){ std::list< Ipopt::RegisteredOption * > options; chooseOptions(which, options); //Create journalist to write to os Ipopt::Journalist jnlst; Ipopt::SmartPtr<Ipopt::StreamJournal> J = new Ipopt::StreamJournal("options_journal", Ipopt::J_ALL); J->SetOutputStream(&os); J->SetPrintLevel(Ipopt::J_DOCUMENTATION, Ipopt::J_SUMMARY); jnlst.AddJournal(GetRawPtr(J)); std::string registeringCategory = ""; for(std::list< Ipopt::RegisteredOption * >::iterator i = options.begin(); i != options.end() ; i++) { if((*i)->RegisteringCategory() != registeringCategory){ registeringCategory = (*i)->RegisteringCategory(); os<<std::endl<<"# registering category: "<<registeringCategory<<std::endl<<std::endl; } os<<"bonmin."; os.setf(std::ios::left); os.width(37); os<<(*i)->Name()<<" "; os.width(10); os<<makeNumber(defaultAsString(*i))<<"\t#"; os<<(*i)->ShortDescription(); os<<std::endl; } }
/** Output Latex/Html options documentation.*/ void RegisteredOptions::writeLatexHtmlDoc(std::ostream &os, ExtraCategoriesInfo which){ std::list< Ipopt::RegisteredOption * > options; chooseOptions(which, options); os<<"\\latexhtml{}{"<<std::endl; os<<"\\HCode{"<<std::endl; writeHtmlOptionsTable(os, options); os<<"}\n}"<<std::endl; //Create journalist to write to os Ipopt::Journalist jnlst; Ipopt::SmartPtr<Ipopt::StreamJournal> J = new Ipopt::StreamJournal("options_journal", Ipopt::J_ALL); J->SetOutputStream(&os); J->SetPrintLevel(Ipopt::J_DOCUMENTATION, Ipopt::J_SUMMARY); jnlst.AddJournal(GetRawPtr(J)); std::string registeringCategory = ""; for(std::list< Ipopt::RegisteredOption * >::iterator i = options.begin(); i != options.end() ; i++) { if((*i)->RegisteringCategory() != registeringCategory){ registeringCategory = (*i)->RegisteringCategory(); os<<"\\subsection{"<<registeringCategory<<"}"<<std::endl; os<<"\\label{sec:"<<makeSpaceLess(registeringCategory)<<"}"<<std::endl; os<<"\\htmlanchor{sec:"<<makeSpaceLess(registeringCategory)<<"}"<<std::endl; } (*i)->OutputLatexDescription(jnlst); } }