SALOME - SMESH
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
utilities.h File Reference
#include <iostream>
#include <sstream>
#include <cstdlib>
Include dependency graph for utilities.h:

Go to the source code of this file.

Macros

#define _NOMSG_
 
#define UTILITIES_H
 
#define DEF_MSG_BUFFER   std::cout
 
#define MESS_INIT(deb)   std::ostringstream os; os<<deb
 
#define MESS_BEGIN(deb)   MESS_INIT(deb)<<__FILE__<<" ["<<__LINE__<<"] : "
 
#define MESS_END
 
#define MESS_ABORT
 
#define INFOS(msg)   {MESS_BEGIN("- Trace ") << msg << MESS_END}
 
#define PYSCRIPT(msg)   {MESS_INIT("---PYSCRIPT--- ") << msg << MESS_END}
 
#define INTERRUPTION(msg)   {MESS_BEGIN("- INTERRUPTION: ")<< msg << MESS_ABORT}
 
#define IMMEDIATE_ABORT(code)
 
#define COMPILER   "undefined"
 
#define INFOS_COMPILATION
 
#define MESSAGE(msg)
 
#define SCRUTE(var)
 
#define REPERE
 
#define BEGIN_OF(msg)
 
#define END_OF(msg)
 
#define ASSERT(condition)   {}
 

Macro Definition Documentation

#define _NOMSG_

Definition at line 30 of file utilities.h.

#define UTILITIES_H

Definition at line 35 of file utilities.h.

#define DEF_MSG_BUFFER   std::cout

Definition at line 42 of file utilities.h.

#define MESS_INIT (   deb)    std::ostringstream os; os<<deb

For each message to put in the trace, a specific ostingstream object is created and destroyed automatically at the end of the message macro. This message is automatically passed to std::cout

Definition at line 50 of file utilities.h.

#define MESS_BEGIN (   deb)    MESS_INIT(deb)<<__FILE__<<" ["<<__LINE__<<"] : "

Definition at line 51 of file utilities.h.

#define MESS_END
Value:
std::endl; \
DEF_MSG_BUFFER << os.str() << std::endl;
#define DEF_MSG_BUFFER
Definition: utilities.h:42

Definition at line 53 of file utilities.h.

#define MESS_ABORT
Value:
std::endl; \
DEF_MSG_BUFFER << os.str() << std::endl;
#define DEF_MSG_BUFFER
Definition: utilities.h:42

Definition at line 56 of file utilities.h.

#define INFOS (   msg)    {MESS_BEGIN("- Trace ") << msg << MESS_END}

Definition at line 61 of file utilities.h.

#define PYSCRIPT (   msg)    {MESS_INIT("---PYSCRIPT--- ") << msg << MESS_END}

Definition at line 62 of file utilities.h.

#define INTERRUPTION (   msg)    {MESS_BEGIN("- INTERRUPTION: ")<< msg << MESS_ABORT}

Definition at line 63 of file utilities.h.

#define IMMEDIATE_ABORT (   code)
Value:
{std::cout <<std::flush; \
std::cerr << "- ABORT " << __FILE__ << " [" <<__LINE__<< "] : " << flush; \
std::cerr << "ABORT return code= "<< code << std::endl; \
std::exit(code);}

Definition at line 70 of file utilities.h.

#define COMPILER   "undefined"

Definition at line 91 of file utilities.h.

#define INFOS_COMPILATION

Definition at line 134 of file utilities.h.

#define MESSAGE (   msg)

Definition at line 135 of file utilities.h.

#define SCRUTE (   var)

Definition at line 136 of file utilities.h.

#define REPERE

Definition at line 137 of file utilities.h.

#define BEGIN_OF (   msg)

Definition at line 138 of file utilities.h.

#define END_OF (   msg)

Definition at line 139 of file utilities.h.

#define ASSERT (   condition)    {}

Definition at line 142 of file utilities.h.