X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FcreaMessageManager.h;h=9fbaae5be932bca8f282d99d4422039481da9c90;hb=7afa3ebd8c9f99468d8de5683978bf602ffac4cb;hp=87fb5f887c9773b5120c2ec75cb8f213de3ef58e;hpb=f85d688193588c7429d0ec2ccc0777a4596f1d47;p=crea.git diff --git a/src/creaMessageManager.h b/src/creaMessageManager.h index 87fb5f8..9fbaae5 100644 --- a/src/creaMessageManager.h +++ b/src/creaMessageManager.h @@ -1,149 +1,58 @@ - - /*! \file - - - \brief Class creaMessageManager and Macros for outputing messages in crea - - - There are 4 kinds of messages : - - Messages (normal messages) - - Debug messages (not compiled in release) - - Warnings - - Errors - There are also "types" of messages which are strings which identify the nature of the message - (for example : "Kernel" messages are generated by the core classes of the library, there can be a type of - message for each type of Node, and so on...) - A type of message must be declared by registering it into the MessageManager. This is done by a line like : - crea::MessageManager::RegisterMessageType("Kernel","Messages generated by the core classes of the library",5); - where : - -The first string is the type of the message (the category which will be used to generate a message of this type) - -The second string is help string - -The integer is the initial level for the messages of this type (see below). - - - To generate a message of a known type then use one of the macros : - creaMessage, creaDebugMessage, creaWarning, creaError or their variants. - - - example : - - - creaMessage("Kernel",4,"problem with "< - #include - - - #include - #include - #include - #include - - - // Comment out these symbols to prevent compilation - //#define CREA_COMPILE_MESSAGES - //#define CREA_COMPILE_DEBUG_MESSAGES - //#define CREA_COMPILE_WARNING_MESSAGES - //#define CREA_COMPILE_ERROR_MESSAGES - - - - - #define creaOnMessageLevel(key,value) \ int __creaOnMessageLevelVariable = \ crea::MessageManager::GetMessageLevel(key); \ @@ -153,8 +62,6 @@ } \ else if (value<= __creaOnMessageLevelVariable) - - #ifdef CREA_PREPEND_MESSAGE_WITH_CODE #define creaMessageCode \ key[0] << key[1] << key[2] << value << " " @@ -162,8 +69,6 @@ #define creaMessageCode "" #endif - - #ifdef CREA_PREPEND_MESSAGE_WITH_TAB #define creaMessageTab \ crea::MessageManager::GetTab() @@ -171,8 +76,6 @@ #define creaMessageTab "" #endif - - //#define CREA_PREPEND_MESSAGE_WITH_SPACE #ifdef CREA_PREPEND_MESSAGE_WITH_SPACE #define creaMessageSpace(value) \