/*! *\file message_ns.hpp */ #ifndef MESSAGE_NS_HPP #define MESSAGE_NS_HPP #include "message.hpp" /*! * \brief Namespace for error, warning and informative messages. */ namespace message_ns{ /******************************* Declared inside message_ns.cpp ********************************/ /*! * \brief Message variabel will contain messages which must be displayed. */ extern std::stringstream message; /*! * \brief Putting ende in message variable will triggered message display with the error flag. */ extern Enderror ende; /*! * \brief Putting endw in message variable will triggered message display with the warning flag. */ extern Endwarning endw; /*! * \brief Putting endi in message variable will triggered message display with the information flag. */ extern Endinformation endi; /******************************* The operator function declaration ********************************/ /*! * \brief The macro OP_FUNC_DECL defines operator << for message displaying system. * * It will create as operator << functions as different kind of message classes. Operator takes a string stream (it can be strings with numbers and booleans) than trigger the display of this stream according to the second argument which decides what kind of message it is (for example : an error message or a warning message). */ #define OP_FUNC_DECL(T) std::ostream& operator<< (std::ostream& stream, T & e ); /*! * \brief Defines operator<< function for error message class. */ OP_FUNC_DECL(Enderror) /*! * \brief Defines operator<< function for warning message class. */ OP_FUNC_DECL(Endwarning) /*! * \brief Defines operator<< function for informative message class. */ OP_FUNC_DECL(Endinformation) } #endif