GAMSlinks  0.4
Public Member Functions | Private Attributes | List of all members
GamsMessageHandler Class Reference

A CoinUtils message handler that writes into the GAMS status- and logfile. More...

#include <GamsMessageHandler.hpp>

Inheritance diagram for GamsMessageHandler:
Inheritance graph
[legend]
Collaboration diagram for GamsMessageHandler:
Collaboration graph
[legend]

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

GamsHandlergams
 
int rmlblanks_
 

Detailed Description

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.

Constructor & Destructor Documentation

GamsMessageHandler::GamsMessageHandler ( GamsHandler gams_)

Constructor.

Parameters
gams_A GAMS handler to access the GAMS status- and logfile.

Referenced by clone().

GamsMessageHandler::~GamsMessageHandler ( )

Destructor.

Member Function Documentation

void GamsMessageHandler::setRemoveLBlanks ( int  rm)
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.

Parameters
detailDetail level.
int GamsMessageHandler::getCurrentDetail ( ) const

Returns the detail level of the current message.

Returns
Detail level.
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.

Returns
Zero.
CoinMessageHandler* GamsMessageHandler::clone ( ) const
inline

Creates a copy of this message handler.

Definition at line 61 of file GamsMessageHandler.hpp.

References gams, and GamsMessageHandler().

Member Data Documentation

GamsHandler& GamsMessageHandler::gams
private

Definition at line 64 of file GamsMessageHandler.hpp.

Referenced by clone().

int GamsMessageHandler::rmlblanks_
private

Definition at line 65 of file GamsMessageHandler.hpp.

Referenced by setRemoveLBlanks().


The documentation for this class was generated from the following file: