Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 10, 2013, 3:08:58 PM (11 years ago)
Author:
landauf
Message:

added option to disable static caching of output contexts (for unit tests)
fixed description of ConsoleWriter and LogWriter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/testing/src/libraries/util/output/OutputDefinitions.h

    r9540 r9542  
    4747    context argument.
    4848*/
    49 #define REGISTER_OUTPUT_CONTEXT(name) \
    50     const OutputContextContainer& name() { static OutputContextContainer context = registerContext(#name); return context; }
     49#ifndef DISABLE_OUTPUT_CONTEXT_STATIC_CACHE
     50    #define REGISTER_OUTPUT_CONTEXT(name) \
     51        const OutputContextContainer& name() { static OutputContextContainer context = registerContext(#name); return context; }
     52#else
     53    #define REGISTER_OUTPUT_CONTEXT(name) \
     54        const OutputContextContainer& name() { return registerContext(#name); }
     55#endif
    5156
    5257/**
     
    6065    individually by derivatives of orxonox::SubcontextOutputListener.
    6166*/
    62 #define REGISTER_OUTPUT_SUBCONTEXT(name, subname) \
    63     const OutputContextContainer& subname() { static const OutputContextContainer& context = registerContext(#name, #subname); return context; }
     67#ifndef DISABLE_OUTPUT_CONTEXT_STATIC_CACHE
     68    #define REGISTER_OUTPUT_SUBCONTEXT(name, subname) \
     69        const OutputContextContainer& subname() { static const OutputContextContainer context = registerContext(#name, #subname); return context; }
     70#else
     71    #define REGISTER_OUTPUT_SUBCONTEXT(name, subname) \
     72        const OutputContextContainer& subname() { return registerContext(#name, #subname); }
     73#endif
    6474
    6575// tolua_begin
Note: See TracChangeset for help on using the changeset viewer.