6 #ifndef CoinMessageHandler_H 7 #define CoinMessageHandler_H 106 detail_ =
static_cast< char >(level);
188 language_ = newlanguage;
191 void setDetailMessage(
int newLevel,
int messageNumber);
199 void setDetailMessages(
int newLevel,
int numberMessages,
200 int *messageNumbers);
202 void setDetailMessages(
int newLevel,
int low,
int high);
357 virtual void checkSeverity();
404 void setLogLevel(
int value);
408 return logLevels_[which];
414 void setLogLevel(
int which,
int value);
417 void setPrecision(
unsigned int new_precision);
422 void setPrefix(
bool yesNo);
432 return doubleValue_[position];
440 return static_cast< int >(doubleValue_.size());
449 return longValue_[position];
457 return static_cast< int >(longValue_.size());
466 return charValue_[position];
474 return static_cast< int >(charValue_.size());
483 return stringValue_[position];
491 return static_cast< int >(stringValue_.size());
497 return currentMessage_;
507 return messageBuffer_;
512 return highestNumber_;
573 #if COIN_BIG_INDEX == 1 580 #if COIN_BIG_INDEX == 2 638 #define COIN_NUM_LOG 4 639 #define COIN_MESSAGE_HANDLER_MAX_BUFFER_SIZE 1000 644 std::vector< double > doubleValue_;
694 char *nextPerCent(
char *start,
const bool initial =
false);
703 void calcPrintStatus(
int msglvl,
int msgclass);
int numberDoubleFields() const
Number of double fields already processed.
std::string source_
Current source of message.
void setExternalNumber(int number)
Set message ID number.
char * format_
Format string for message (remainder)
int numberStringFields() const
Number of string fields already processed.
void replaceMessage(const char *message)
Replace message text (e.g., text in a different language)
int internalNumber_
Internal number for use with enums.
int numberIntFields() const
Number of integer fields already processed.
#define COIN_NUM_LOG
Log levels will be by type and will then use type given in CoinMessage::class_.
int getClass() const
Returns class.
char charValue(int position) const
Values of char fields already processed.
int printStatus_
0 - Normal.
char severity() const
Severity.
CoinOneMessage & operator=(const CoinOneMessage &)
assignment operator.
CoinOneMessage currentMessage() const
Current message.
int externalNumber_
number to print out (also determines severity)
FILE * filePointer() const
Get current file pointer.
Language language() const
Language.
int class_
Class - see later on before CoinMessageHandler.
Base class for message handling.
void setDetail(int level)
Set detail level.
int lengthMessages_
Length of fake CoinOneMessage array.
std::vector< char > charValue_
void setLanguage(Language newlanguage)
Set language.
const char * messageBuffer() const
Output buffer.
std::string stringValue(int position) const
Values of string fields already processed.
Language language_
Language.
double doubleValue(int position) const
Values of double fields already processed.
char message_[400]
Messages (in correct language) (not all 400 may exist)
CoinOneMessage currentMessage_
Current message.
int highestNumber() const
Highest message number (indicates any errors)
std::vector< CoinBigIndex > longValue_
CoinOneMessage ** message_
Messages.
int numberCharFields() const
Number of char fields already processed.
int highestNumber_
Highest message number (indicates any errors)
int g_precision_
Current number of significant digits for floating point numbers.
bool CoinMessageHandlerUnitTest()
A function that tests the methods in the CoinMessageHandler class.
int logLevel(int which) const
Get alternative log level.
char * message() const
Return the message text.
Language
Supported languages.
void print(const char *fmt,...)
std::ostream & operator<<(std::ostream &s, const CoinParam ¶m)
A stream output function for a CoinParam object.
int logLevel() const
Get current log (detail) level.
char detail_
Will only print if detail matches.
std::string currentSource() const
Source of current message.
CoinOneMessage()
Default constructor.
int detail() const
Get detail level.
int externalNumber() const
Get message ID number.
~CoinOneMessage()
Destructor.
int prefix_
Whether we want prefix (may get more subtle so is int)
char * messageOut_
Position in output buffer.
Class to hold and manipulate an array of massaged messages.
std::vector< std::string > stringValue_
Class for one massaged message.
void setFilePointer(FILE *fp)
Set new file pointer.
#define COIN_MESSAGE_HANDLER_MAX_BUFFER_SIZE
Maximum length of constructed message (characters)
CoinBigIndex intValue(int position) const
Values of integer fields already processed.
int precision()
Current number of significant digits for printing floating point numbers.