GAMSlinks
0.4
|
A CoinUtils message handler that writes into the GAMS status- and logfile. More...
#include <GamsMessageHandler.hpp>
Public Member Functions | |
GamsMessageHandler (GamsHandler &gams_) | |
Constructor. More... | |
~GamsMessageHandler () | |
Destructor. More... | |
void | setRemoveLBlanks (int rm) |
Sets the number of spaces to remove at the front of a message. More... | |
void | setCurrentDetail (int detail) |
Sets the detail level of the current message. More... | |
int | getCurrentDetail () const |
Returns the detail level of the current message. More... | |
int | print () |
Prints the message from the message buffer. More... | |
CoinMessageHandler * | clone () const |
Creates a copy of this message handler. More... | |
Private Attributes | |
GamsHandler & | gams |
int | rmlblanks_ |
A CoinUtils message handler that writes into the GAMS status- and logfile.
Thread safe if CBC_THREAD is defined.
Definition at line 26 of file GamsMessageHandler.hpp.
GamsMessageHandler::GamsMessageHandler | ( | GamsHandler & | gams_ | ) |
Constructor.
gams_ | A GAMS handler to access the GAMS status- and logfile. |
Referenced by clone().
GamsMessageHandler::~GamsMessageHandler | ( | ) |
Destructor.
|
inline |
Sets the number of spaces to remove at the front of a message.
Definition at line 39 of file GamsMessageHandler.hpp.
References rmlblanks_.
void GamsMessageHandler::setCurrentDetail | ( | int | detail | ) |
Sets the detail level of the current message.
detail | Detail level. |
int GamsMessageHandler::getCurrentDetail | ( | ) | const |
Returns the detail level of the current message.
int GamsMessageHandler::print | ( | ) |
Prints the message from the message buffer.
Removes at most rmlblanks_ from the beginning and all newlines at the end of the message buffer. If currentMessage().detail() is smaller then 2, the message is written to logfile and statusfile, otherwise it is written only to the logfile. If the pointer to the GamsModel is not set, the output goes to standard out.
|
inline |
Creates a copy of this message handler.
Definition at line 61 of file GamsMessageHandler.hpp.
References gams, and GamsMessageHandler().
|
private |
Definition at line 64 of file GamsMessageHandler.hpp.
Referenced by clone().
|
private |
Definition at line 65 of file GamsMessageHandler.hpp.
Referenced by setRemoveLBlanks().