Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 12, 2013, 11:13:03 PM (11 years ago)
Author:
landauf
Message:

merged testing branch back to trunk. unbelievable it took me 13 months to finish this chore…

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/util/output/OutputDefinitions.h

    r8879 r9550  
    4747    context argument.
    4848*/
    49 #define REGISTER_OUTPUT_CONTEXT(name) \
    50     const OutputContextContainer& name() { static const 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
     
    105115        OutputContextSubID sub_id;  ///< The id of the sub-context (or context::no_subcontext if this container doesn't define a sub-context)
    106116        std::string name;           ///< The name of this context
     117
     118        inline bool operator==(const OutputContextContainer& other) const
     119        {
     120            return this->mask == other.mask && this->sub_id == other.sub_id && this->name == other.name;
     121        }
    107122    };
    108123
Note: See TracChangeset for help on using the changeset viewer.