Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 24, 2009, 11:35:31 PM (15 years ago)
Author:
rgrieder
Message:

Replaced the load of macros in Debug.h with just two, doing almost exactly the same. The only difference is that the compiler can now completely eliminate COUT with a level higher than the hard debug level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/libraries/util/OutputHandler.h

    r5983 r5991  
    4848namespace orxonox
    4949{
     50    namespace OutputLevel
     51    {
     52        enum Value
     53        {
     54            None    = 0,
     55            Error   = 1,
     56            Warning = 2,
     57            Info    = 3,
     58            Debug   = 4,
     59            Verbose = 5,
     60            Ultra   = 6,
     61        };
     62    }
     63
    5064    //! The OutputHandler acts like std::cout, but redirects output to the console, the logfile and the ingame shell.
    5165    class _UtilExport OutputHandler
     
    6175
    6276            static OutputHandler& getOutStream();
     77            static inline OutputHandler& getOutStream(int level)
     78                { return OutputHandler::getOutStream().setOutputLevel(level); }
    6379
    6480            /** @brief Puts some text on the outstream. @param text The text */
     
    142158            OutputHandler& operator<<(std::ios& (*manipulator)(std::ios&));
    143159            OutputHandler& operator<<(std::ios_base& (*manipulator)(std::ios_base&));
     160
     161            /** @brief Dummy operator required by Debug.h for the ternary operator */
     162            inline operator int() { return 0; }
    144163
    145164        private:
Note: See TracChangeset for help on using the changeset viewer.