GamsMessageHandler Class Reference

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

#include <GamsMessageHandler.hpp>

Collaboration diagram for GamsMessageHandler:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GamsMessageHandler (GamsHandler &gams_)
 Constructor.
 ~GamsMessageHandler ()
 Destructor.
void setRemoveLBlanks (int rm)
 Sets the number of spaces to remove at the front of a message.
void setCurrentDetail (int detail)
 Sets the detail level of the current message.
int getCurrentDetail () const
 Returns the detail level of the current message.
int print ()
 Prints the message from the message buffer.
CoinMessageHandler * clone () const
 Creates a copy of this message handler.

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:
detail Detail 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:
Generated on Tue Dec 30 03:01:29 2008 for GAMSlinks by  doxygen 1.4.7