template class __TRACKER_NAME { TrackedType TrackedValue; public: inline TrackedType* operator & () { __TRACKER_GLOBAL_HOOK((int)&this->TrackedValue); return &this->TrackedValue; } inline TrackedType operator ++ () { __TRACKER_GLOBAL_HOOK((int)&this->TrackedValue); return ++this->TrackedValue; } inline TrackedType operator ++ (int) { __TRACKER_GLOBAL_HOOK((int)&this->TrackedValue); return this->TrackedValue++; } inline TrackedType operator -- () { __TRACKER_GLOBAL_HOOK((int)&this->TrackedValue); return --this->TrackedValue; } inline TrackedType operator -- (int) { __TRACKER_GLOBAL_HOOK((int)&this->TrackedValue); return this->TrackedValue--; } inline TrackedType operator = (TrackedType); inline TrackedType operator = (__TRACKER_NAME); inline TrackedType operator += (TrackedType); inline TrackedType operator += (__TRACKER_NAME); inline TrackedType operator -= (TrackedType); inline TrackedType operator -= (__TRACKER_NAME); inline TrackedType operator *= (TrackedType); inline TrackedType operator *= (__TRACKER_NAME); inline TrackedType operator /= (TrackedType); inline TrackedType operator /= (__TRACKER_NAME); inline TrackedType operator |= (TrackedType); inline TrackedType operator |= (__TRACKER_NAME); inline TrackedType operator &= (TrackedType); inline TrackedType operator &= (__TRACKER_NAME); inline TrackedType operator ^= (TrackedType); inline TrackedType operator ^= (__TRACKER_NAME); inline TrackedType operator <<= (TrackedType); inline TrackedType operator <<= (__TRACKER_NAME); inline TrackedType operator >>= (TrackedType); inline TrackedType operator >>= (__TRACKER_NAME); inline operator TrackedType() const; }; #ifndef __tracker_hpp #define __tracker_hpp enum { __TRACKER_NOOP_RIGHTHAND_EQUAL = 0, __TRACKER_NOOP_RIGHTHAND_ZERO, __TRACKER_NOOP_RIGHTHAND_ONE, __TRACKER_NEVER, }; #endif #define __TRACKER_RIGHTHAND_TYPE __TRACKER_NAME rightHand #define __TRACKER_RIGHTHAND rightHand.TrackedValue #include "tracker_operators.hpp" #undef __TRACKER_RIGHTHAND_TYPE #undef __TRACKER_RIGHTHAND #define __TRACKER_RIGHTHAND_TYPE TrackedType rightHand #define __TRACKER_RIGHTHAND rightHand #include "tracker_operators.hpp" #undef __TRACKER_RIGHTHAND_TYPE #undef __TRACKER_RIGHTHAND template __TRACKER_NAME::operator TrackedType() const { return this->TrackedValue; }