Changeset 1159


Ignore:
Timestamp:
Feb 13, 2008 12:38:27 PM (12 years ago)
Author:
forrest
Message:

for alternate messages

Location:
stable/1.6/Clp/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable/1.6/Clp/src/CbcOrClpParam.cpp

    r1144 r1159  
    3636static bool doPrinting=true;
    3737std::string afterEquals="";
     38static char printArray[200];
    3839void setCbcOrClpPrinting(bool yesNo)
    3940{
     
    880881
    881882    currentKeyWord_=value;
     883}
     884// Sets current parameter option and returns printable string
     885const char *
     886CbcOrClpParam::setCurrentOptionWithMessage ( int value )
     887{
     888  if (value!=currentKeyWord_) {
     889    sprintf(printArray,"Option for %s changed from %s to %s",
     890            name_.c_str(),definedKeyWords_[currentKeyWord_].c_str(),
     891            definedKeyWords_[value].c_str());
     892
     893    currentKeyWord_=value;
     894  } else {
     895    printArray[0]='\0';
     896  }
     897  return printArray;
    882898}
    883899void
  • stable/1.6/Clp/src/CbcOrClpParam.hpp

    r1144 r1159  
    173173  /// Sets current parameter option
    174174  void setCurrentOption ( int value , bool printIt=false);
     175  /// Sets current parameter option and returns printable string
     176  const char * setCurrentOptionWithMessage ( int value );
    175177  /// Sets current parameter option using string
    176178  void setCurrentOption (const std::string value );
Note: See TracChangeset for help on using the changeset viewer.