Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 11, 2010, 12:34:00 AM (15 years ago)
Author:
landauf
Message:

merged doc branch back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/util/Debug.h

    r6443 r7401  
    2929
    3030/**
     31    @defgroup COUT COUT(x) output macro
     32    @ingroup Util
     33*/
     34
     35/**
    3136@file
     37@ingroup COUT
    3238@brief
    33     Handles different output-levels of errors, warnings, infos and debug information.
     39    Handles different output-levels of errors, warnings, infos, and debug information.
    3440
    35     The COUT(level) macro acts like std::cout, but the output is only performed if the given
     41    The COUT(level) macro acts like @c std::cout, but the output is only performed if the given
    3642    level is <= the soft debug level.
    3743
     
    3945     - The hard debug level is used during compile time. It describes the highest allowed output level.
    4046     - The soft debug level is used during runtime and is the maximum of the three configurable
    41        output-levels for console, log file and in game shell.
     47       output-levels for console, log file, and in game shell.
    4248
    4349    The separation between the three devices is done by the OutputHandler.
    4450
     51    @anchor COUTlevels
    4552    Possible levels are:
    46      0: Very important output
    47      1: Errors
    48      2: Warnings
    49      3: Information
    50      4: Debug information
    51      5: More debug information
    52      6: Crazy debug information
     53     - 0: Very important output
     54     - 1: Errors
     55     - 2: Warnings
     56     - 3: Information
     57     - 4: Debug information
     58     - 5: More debug information
     59     - 6: Crazy debug information
    5360
    54 @example
     61    Example:
     62    @code
    5563    COUT(0) << "Very important output" << std::endl;
    5664    COUT(1) << "Error: Something went wrong!" << std::endl;
     
    5866    COUT(3) << "Info: It's Monday" << std::endl;
    5967    COUT(4) << "Debug: x is 1.23456" << std::endl;
     68    @endcode
    6069*/
    6170
     
    9099/**
    91100@brief
    92     Logs text output: use exactly like std::cout, but specify an output
    93     level as argument.
    94 @details
    95     (a > b ? 0 : c << "text") is equivalent to (a > b ? 0 : (c << "text"))
    96     where (a > b ? 0 : ) stands for COUT(x). This should explain how
     101    Logs text output: You can use COUT(level) exactly like @c std::cout, but you have to specify an output level as argument.
     102@param level
     103    The level of the following output (passed with <tt><< "text"</tt>). Lower levels are more important. See @ref COUTlevels "the description above" for a list of possible output levels.
     104
     105    Example:
     106    @code
     107    COUT(3) << "Some info" << std::endl; // Output with level 3
     108    @endcode
     109@note
     110    <tt>(a > b ? 0 : c << "text")</tt> is equivalent to <tt>(a > b ? 0 : (c << "text")</tt>
     111    where <tt>(a > b ? 0 : )</tt> stands for COUT(x). This should explain how
    97112    this macro magic can possibly even work ;)
    98 @example
    99     COUT(3) << "Some info" << std::endl;
    100 @note
    101     The ? : operator requires both possible results to have the type of
     113@remarks
     114    The <tt>? :</tt> operator requires both possible results to have the type of
    102115    the first. This is achieved by the int conversion operator dummy
    103     in the OutputHandler.
     116    in the @ref orxonox::OutputHandler.
    104117*/
    105118#define COUT(level)                                                    \
Note: See TracChangeset for help on using the changeset viewer.