CONOPT
Loading...
Searching...
No Matches
messagehandler.h
Go to the documentation of this file.
1/*****************************************************************************/
2/* File: messagehandler.h */
3/* Version 4.27 */
4/* CONOPT header file to be used internally in CONOPT defining the calling */
5/* conventions used inside the CONOPT library / DLL / shared object. */
6/* */
7/* Copyright (C) 1995-2024 GAMS Software GmbH */
8/* Copyright (C) 1995-2024 GAMS Development Corporation */
9/* All Rights Reserved. */
10/* */
11/* THIS MATERIAL IS CONSIDERED A TRADE SECRET. */
12/* UNAUTHORIZED ACCESS, USE, REPRODUCTION OR DISTRIBUTION IS PROHIBITED. */
13/*****************************************************************************/
18
19#ifndef _MESSAGEHANDLER_H_
20#define _MESSAGEHANDLER_H_
21
22#include <string>
23#include <vector>
24
25#include "conoptic.h"
26#include "defines.h"
27
28#ifdef _MSC_VER
29#pragma warning( push )
30// disable warning on using STL (members without a DLL interface) in ConoptMessageHandler (class with a DLL interface)
31#pragma warning( disable: 1744 )
32#endif
33
35{
37 int phase;
40 int numnopt;
43 double suminfeas;
46 double objvalue;
48 double rgmax;
50 double step;
51 //const double* x; /**< The current point. */
52 int numvar;
53};
54
59class COI_API ConoptMessageHandler {
60public:
65
70
81 virtual int message(
82 int smsg,
83 int dmsg,
84 int nmsg,
85 const std::vector<std::string>& msgv
86 );
87
119 virtual int errorMessage(
120 int rowno,
121 int colno,
122 int posno,
123 const std::string& msg
124 );
125
126 virtual int progress(
127 const ConoptAlgProgress& progressdata
128 )
129 {
130 return 0;
131 }
132
138 int sendMessage(std::string msg);
139
148
149 friend class ConoptCpp;
150private:
151 ConoptVerbosityLevel verblevel_;
152};
153
154#ifdef _MSC_VER
155#pragma warning( pop )
156#endif
157
158#endif // _MESSAGEHANDLER_H_
virtual int progress(const ConoptAlgProgress &progressdata)
virtual ~ConoptMessageHandler()
Destructor.
virtual int errorMessage(int rowno, int colno, int posno, const std::string &msg)
virtual method for handling error messages.
int sendMessage(std::string msg)
sends a message to the message handler
void setVerbosityLevel(ConoptVerbosityLevel verblevel)
sets the verbosity level for messaging.
virtual int message(int smsg, int dmsg, int nmsg, const std::vector< std::string > &msgv)
virtual method for handling the messages.
ConoptMessageHandler()
Constructor.
ConoptVerbosityLevel
the verbosity level of the message handler
Definition defines.h:71