Changeset 9550 for code/trunk/src/libraries/util/output/OutputDefinitions.h
- Timestamp:
- Mar 12, 2013, 11:13:03 PM (11 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/testing (added) merged: 9015,9017,9020-9022,9025-9026,9047,9076-9078,9114-9115,9221-9226,9356,9473-9480,9524,9529-9531,9533-9545,9547-9549
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/util/output/OutputDefinitions.h
r8879 r9550 47 47 context argument. 48 48 */ 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 51 56 52 57 /** … … 60 65 individually by derivatives of orxonox::SubcontextOutputListener. 61 66 */ 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 64 74 65 75 // tolua_begin … … 105 115 OutputContextSubID sub_id; ///< The id of the sub-context (or context::no_subcontext if this container doesn't define a sub-context) 106 116 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 } 107 122 }; 108 123
Note: See TracChangeset
for help on using the changeset viewer.