GAMSlinks  0.4
GamsMessageHandler.hpp
Go to the documentation of this file.
1 // Copyright (C) GAMS Development 2006-2008
2 // All Rights Reserved.
3 // This code is published under the Common Public License.
4 //
5 // $Id: GamsMessageHandler.hpp 510 2008-08-16 19:31:27Z stefan $
6 //
7 // Authors: Michael Bussieck, Stefan Vigerske
8 
9 #ifndef GamsMessageHandler_H
10 #define GamsMessageHandler_H
11 
12 #include "GAMSlinksConfig.h"
13 
14 #include "CoinPragma.hpp"
15 #include "CoinMessageHandler.hpp"
16 
17 #include "GamsHandler.hpp"
18 
19 #ifdef CBC_THREAD
20 #include <pthread.h>
21 #endif
22 
26 class GamsMessageHandler : public CoinMessageHandler {
27 public:
32 
36 
39  inline void setRemoveLBlanks(int rm) { rmlblanks_ = rm; }
40 
44  void setCurrentDetail(int detail);
45 
49  int getCurrentDetail() const;
50 
57  int print();
58 
61  CoinMessageHandler* clone() const { return new GamsMessageHandler(gams); }
62 
63 private:
66 #ifdef CBC_THREAD
67  pthread_mutex_t print_mutex;
68 #endif
69 };
70 
71 #endif // GamsMessageHandler_H
int getCurrentDetail() const
Returns the detail level of the current message.
~GamsMessageHandler()
Destructor.
int print()
Prints the message from the message buffer.
A CoinUtils message handler that writes into the GAMS status- and logfile.
GamsMessageHandler(GamsHandler &gams_)
Constructor.
Forwards requests for output, point transformations, dictionary files, and other things to a GAMS I/O...
Definition: GamsHandler.hpp:18
void setCurrentDetail(int detail)
Sets the detail level of the current message.
CoinMessageHandler * clone() const
Creates a copy of this message handler.
void setRemoveLBlanks(int rm)
Sets the number of spaces to remove at the front of a message.