/[ascend]/trunk/pygtk/interface/solver.cpp
ViewVC logotype

Diff of /trunk/pygtk/interface/solver.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 150 by johnpye, Thu Dec 22 09:24:56 2005 UTC revision 151 by johnpye, Thu Dec 22 10:58:33 2005 UTC
# Line 37  Solver::getIndex() const{ Line 37  Solver::getIndex() const{
37          ss << "Unknown or unregistered solver '" << name << "'";          ss << "Unknown or unregistered solver '" << name << "'";
38          throw runtime_error(ss.str());          throw runtime_error(ss.str());
39      }      }
40      cerr << "SOLVER INDEX RETURNED IS " << index << endl;      cerr << "))))))))))))))SOLVER INDEX RETURNED IS " << index << endl;
41      return index;      return index;
42  }  }
43    
# Line 51  Solver::getName() const{ Line 51  Solver::getName() const{
51    
52  void  void
53  registerSolver(SlvRegistration regfuncptr){  registerSolver(SlvRegistration regfuncptr){
54      int newclient;      int newclient =-1;
55      int res = slv_register_client(regfuncptr,NULL,NULL,&newclient);      int res = slv_register_client(regfuncptr,NULL,NULL,&newclient);
56      if(res!=0){      if(res!=0){
57          error_reporter(ASC_PROG_ERROR,NULL,0,"Unable to register solver");          error_reporter(ASC_PROG_ERROR,NULL,0,"Unable to register solver");
58          throw runtime_error("Solver::registerSolver: Unable to register solver");          throw runtime_error("Solver::registerSolver: Unable to register solver");
59      }else{      }else{
60          string name = slv_solver_name(newclient);          string name = slv_solver_name(newclient);
61          error_reporter(ASC_PROG_NOTE,NULL,0,"Registered solver '%s' (index %d)", name.c_str(), newclient );          error_reporter(ASC_PROG_NOTE,NULL,0,"Registered solver '%s' (index %d)\n", name.c_str(), newclient );
62      }      }
63  }  }
64    

Legend:
Removed from v.150  
changed lines
  Added in v.151

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22