35 const std::vector<std::string>& msgv
39 for (
int i = 0; i < smsg; i++)
42 std::cout << msgv[i] << std::endl;
46 for (
int i = 0; i < dmsg; i++)
49 fd << msgv[i] << std::endl;
53 for (
int i = 0; i < smsg; i++)
56 fs << msgv[i] << std::endl;
68 const std::string& msg
74 ss <<
"Variable " << colno <<
" : ";
75 else if ( colno == -1 )
76 ss <<
"Equation " << rowno <<
" : ";
78 ss <<
"Variable " << colno <<
" appearing in Equation " << rowno <<
" : ";
82 fd << ss.str() << std::endl;
83 fs << ss.str() << std::endl;
97 std::string execstr(execname);
98 std::size_t lastslash = execstr.find_last_of(
"/\\");
99 std::string
pname(execstr.substr(lastslash + 1));
102 std::size_t extpos =
pname.find(
".exe");
103 if (extpos != std::string::npos)
114 fc.open(conopt.
getName() +
".rc");
115 fc << conopt.
getName() <<
": " << msg << std::endl;
Tut_MessageHandler(std::string name)
virtual int message(int smsg, int dmsg, int nmsg, const std::vector< std::string > &msgv)
virtual int errorMessage(int rowno, int colno, int posno, const std::string &msg)
CONOPT C++ interface header file. This is the main object for the CONOPT C++ interface.
ConoptMessageHandler()
Constructor.
COI_API std::string getName()
returns the model name
void cpp_log(ConoptCpp &conopt, std::string msg, int code)
std::string getProgramName(char *execname)