Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8522 for code


Ignore:
Timestamp:
May 20, 2011, 4:05:32 PM (14 years ago)
Author:
rgrieder
Message:

Added new output macro: DOUT. Use this instead of COUT(0) to produce temporary debug output.
If available, such output will be shown in vivid colours and with a "+++ " prefix.

Any occurrence of this macro in the trunk will be dealt with swiftly and painlessly (it's very easy to search for it).

Location:
code/branches/unity_build/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/unity_build/src/libraries/core/command/IOConsoleWindows.cc

    r7287 r8522  
    208208        case Shell::Command: colour =                        FOREGROUND_GREEN                  | FOREGROUND_BLUE; break;
    209209        case Shell::Hint:    colour =                        FOREGROUND_GREEN | FOREGROUND_RED                  ; break;
     210        case Shell::TDebug:  colour = FOREGROUND_INTENSITY                    | FOREGROUND_RED | FOREGROUND_BLUE; break;
    210211        default:             colour =                        FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE; break;
    211212        }
  • code/branches/unity_build/src/libraries/core/command/Shell.h

    r8518 r8522  
    9191            enum LineType
    9292            {
     93                TDebug  = OutputLevel::TDebug,
    9394                None    = OutputLevel::None,
    9495                Warning = OutputLevel::Warning,
  • code/branches/unity_build/src/libraries/util/Debug.h

    r8518 r8522  
    123123            orxonox::OutputHandler::getOutStream(level)
    124124
     125/** Logs debug output: You can use DOUT exactly like @c std::cout.
     126    Use this macro to produce temporary debug output that will be removed later on.
     127    The console output shall have a special colour if available.
     128*/
     129#define DOUT orxonox::OutputHandler::getOutStream(-1) << "+++ "
     130
    125131#endif /* _Util_Debug_H__ */
  • code/branches/unity_build/src/libraries/util/OutputHandler.h

    r8518 r8522  
    6262        enum Value
    6363        {
     64            TDebug  = -1,
    6465            None    = 0,
    6566            Error   = 1,
  • code/branches/unity_build/src/orxonox/overlays/InGameConsole.cc

    r8515 r8522  
    590590                          colourBottom = ColourValue(0.90f, 0.90f, 0.90f, 1.00f); break;
    591591
     592        case Shell::TDebug:  colourTop = ColourValue(0.90f, 0.00f, 0.90f, 1.00f);
     593                          colourBottom = ColourValue(1.00f, 0.00f, 1.00f, 1.00f); break;
     594
    592595        default:             colourTop = ColourValue(0.90f, 0.90f, 0.90f, 1.00f);
    593596                          colourBottom = ColourValue(1.00f, 1.00f, 1.00f, 1.00f); break;
Note: See TracChangeset for help on using the changeset viewer.