Skip to content
Snippets Groups Projects
message.h 802 B
Newer Older
  • Learn to ignore specific revisions
  • //
    // Created by martin on 9/8/18.
    //
    
    #ifndef PROJECT_MESSAGE_H
    #define PROJECT_MESSAGE_H
    
    
    #include <cassert>
    
    #include <iomanip>
    
    #define COL_WIDTH 20
    #define R_ALIGN std::setw(COL_WIDTH) << std::right
    
    #define COUT_INFO(inp) std::cout << std::flush << std::fixed << std::setprecision(12) << "INFO: " << inp << std::flush
    
    #define COUT_DEBUG(inp) assert(std::cerr << std::flush << std::fixed << std::setprecision(12) << "DEBUG: " << inp << std::flush)
    
    
    #define WRITE_TO_OFS_DEBUG(ofs, msg) { if(ofs && ofs->is_open())\
    
                                               *ofs << std::fixed << std::setprecision(12) << "DEBUG: " << msg;\
    
    #define WRITE_TO_OFS_DEBUG(ofs, msg)