Changeset 2239


Ignore:
Timestamp:
Jan 29, 2020 4:32:52 AM (16 months ago)
Author:
stefan
Message:

move fillAmplOptionList out of RegisteredOptions?

  • as implemented in different library
Location:
branches/autotools-update/Bonmin/src/Interfaces
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/autotools-update/Bonmin/src/Interfaces/Ampl/BonAmplTMINLP.cpp

    r2106 r2239  
    2626
    2727namespace Bonmin{
    28   void
    29   RegisteredOptions::fillAmplOptionList(ExtraCategoriesInfo which, Ipopt::AmplOptionsList * amplOptList){
     28  void fillAmplOptionList(RegisteredOptions& regopts, RegisteredOptions::ExtraCategoriesInfo which, Ipopt::AmplOptionsList * amplOptList){
    3029      std::list<int> test;
    3130      std::list< Ipopt::RegisteredOption * > options;
    32       chooseOptions(which, options);
     31      regopts.chooseOptions(which, options);
    3332      for(std::list< Ipopt::RegisteredOption * >::iterator i = options.begin();
    3433           i != options.end() ; i++)
     
    170169
    171170    SmartPtr<AmplOptionsList> ampl_options_list = new AmplOptionsList();
    172     roptions->fillAmplOptionList(RegisteredOptions::BonminCategory, GetRawPtr(ampl_options_list));
    173     roptions->fillAmplOptionList(RegisteredOptions::FilterCategory, GetRawPtr(ampl_options_list));
    174     roptions->fillAmplOptionList(RegisteredOptions::BqpdCategory, GetRawPtr(ampl_options_list));
     171    fillAmplOptionList(*roptions, RegisteredOptions::BonminCategory, GetRawPtr(ampl_options_list));
     172    fillAmplOptionList(*roptions, RegisteredOptions::FilterCategory, GetRawPtr(ampl_options_list));
     173    fillAmplOptionList(*roptions, RegisteredOptions::BqpdCategory, GetRawPtr(ampl_options_list));
    175174    fillApplicationOptions(GetRawPtr(ampl_options_list) );
    176175    std::string options_id = appName + "_options";
  • branches/autotools-update/Bonmin/src/Interfaces/Ampl/BonAmplTMINLP.hpp

    r2234 r2239  
    327327    int writeAmplSolFile_;
    328328  };
     329 
     330  void fillAmplOptionList(RegisteredOptions& regopts, RegisteredOptions::ExtraCategoriesInfo which, Ipopt::AmplOptionsList * amplOptList);
     331
    329332} // namespace Ipopt
    330333
  • branches/autotools-update/Bonmin/src/Interfaces/BonRegisteredOptions.hpp

    r2234 r2239  
    207207   }
    208208 
    209    /* Forward declaration, the function will be defined in BonAmplTMINLP.cpp*/
    210    void fillAmplOptionList(ExtraCategoriesInfo which, Ipopt::AmplOptionsList * amplOptList);
    211 
    212209   private:
    213210   /** Output Latex table of options.*/
     
    220217       (is bonmin, filterSqp...).*/
    221218   std::map<std::string, ExtraCategoriesInfo> categoriesInfos_;
     219
     220  friend
     221  void fillAmplOptionList(RegisteredOptions& regopts, RegisteredOptions::ExtraCategoriesInfo which, Ipopt::AmplOptionsList * amplOptList);
    222222};
    223223
Note: See TracChangeset for help on using the changeset viewer.