Changeset 372 for cpp/common/hmessage.h


Ignore:
Timestamp:
04/22/15 04:14:59 (9 years ago)
Author:
sz
Message:

Renamed some classes and functions to make their purpose more obvious:

All MessageHandlers? must now be given the explicit "Enable" argument if you want them to automatically become active. This makes side effects clearly visible.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • cpp/common/hmessage.h

    r371 r372  
    33// See LICENSE.txt for details.
    44
    5 #ifndef _FRAMSG_H_
    6 #define _FRAMSG_H_
     5#ifndef _HMESSAGE_H_
     6#define _HMESSAGE_H_
    77
    88#include <stdarg.h>
    99
    10 extern const char* MSG_LEVEL[];
    11 #define FRAMSG_FORMAT "%s%s.%s: %s"
    12 #define FRAMSG_MULTILINE_CONTINUATION "..."
     10extern const char* HMSG_LEVEL[];
     11#define HMSG_FORMAT "%s%s.%s: %s"
     12#define HMSG_MULTILINE_CONTINUATION "..."
    1313
    14 void FMprintf(const char *o,const char *m,int w,const char *bl, ...);
    15 void FMprintf_va(const char *o,const char *m,int w,const char *bl,va_list va); //a different name than FMprintf - otherwise the compiler could confuse the "string" parameter with va_list and could call the wrong function
    16 void printFM(const char *bl,...); //a shorthand for printf (a different name again to avoid the risk of confusion with the two functions above. This would be unlikely but possible when the argument types would match)
    17 void FramMessage(const char *o,const char *m,const char *txt,int w);
     14void Hprintf(const char *o,const char *m,int w,const char *bl, ...);
     15void Hprintf_va(const char *o,const char *m,int w,const char *bl,va_list va); //a different name than Hprintf - otherwise the compiler could confuse the "string" parameter with va_list and could call the wrong function
     16void printH(const char *bl,...); //a shorthand for printf (a different name again to avoid the risk of confusion with the two functions above. This would be unlikely but possible when the argument types would match)
     17void Hmessage(const char *o,const char *m,const char *txt,int w);
    1818
    19 void _FramMessageSingleLine(const char *o,const char *m,const char *txt,int w); //don't call this directly - it is used internally
     19void _HmessageSingleLine(const char *o,const char *m,const char *txt,int w); //don't call this directly - it is used internally
    2020
    21 #define FMLV_DEBUG -1
    22 #define FMLV_INFO 0
    23 #define FMLV_WARN 1
    24 #define FMLV_ERROR 2
    25 #define FMLV_CRITICAL 3
     21#define HMLV_DEBUG -1
     22#define HMLV_INFO 0
     23#define HMLV_WARN 1
     24#define HMLV_ERROR 2
     25#define HMLV_CRITICAL 3
    2626
    2727/*
Note: See TracChangeset for help on using the changeset viewer.