Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | Enumerations | Functions
CoinMessageHandler.hpp File Reference

This is a first attempt at a message handler. More...

#include "CoinUtilsConfig.h"
#include "CoinPragma.hpp"
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
+ Include dependency graph for CoinMessageHandler.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CoinOneMessage
 Class for one massaged message. More...
 
class  CoinMessages
 Class to hold and manipulate an array of massaged messages. More...
 
class  CoinMessageHandler
 Base class for message handling. More...
 

Macros

#define COIN_NUM_LOG   4
 Log levels will be by type and will then use type given in CoinMessage::class_. More...
 
#define COIN_MESSAGE_HANDLER_MAX_BUFFER_SIZE   1000
 Maximum length of constructed message (characters) More...
 

Enumerations

enum  CoinMessageMarker { CoinMessageEol = 0, CoinMessageNewline = 1 }
 

Functions

bool CoinMessageHandlerUnitTest ()
 A function that tests the methods in the CoinMessageHandler class. More...
 

Detailed Description

This is a first attempt at a message handler.

The COIN Project is in favo(u)r of multi-language support. This implementation of a message handler tries to make it as lightweight as possible in the sense that only a subset of messages need to be defined — the rest default to US English.

The default handler at present just prints to stdout or to a FILE pointer

Todo:
This needs to be worked over for correct operation with ISO character codes.

Definition in file CoinMessageHandler.hpp.

Macro Definition Documentation

#define COIN_NUM_LOG   4

Log levels will be by type and will then use type given in CoinMessage::class_.

  • 0 - Branch and bound code or similar
  • 1 - Solver
  • 2 - Stuff in Coin directory
  • 3 - Cut generators

Definition at line 586 of file CoinMessageHandler.hpp.

#define COIN_MESSAGE_HANDLER_MAX_BUFFER_SIZE   1000

Maximum length of constructed message (characters)

Definition at line 588 of file CoinMessageHandler.hpp.

Enumeration Type Documentation

Enumerator
CoinMessageEol 
CoinMessageNewline 

Definition at line 217 of file CoinMessageHandler.hpp.

Function Documentation

bool CoinMessageHandlerUnitTest ( )

A function that tests the methods in the CoinMessageHandler class.

The only reason for it not to be a member method is that this way it doesn't have to be compiled into the library. And that's a gain, because the library should be compiled with optimization on, but this method should be compiled with debugging.