Go to the documentation of this file.
12 #ifndef __FBX_SCENEPROXYSUPPORT_H_INCLUDED__
13 #define __FBX_SCENEPROXYSUPPORT_H_INCLUDED__
19 #define FBX_SCENEPROXY_DECLARE_ID(TYPE) \
23 TYPE() : myPtr(nullptr) { } \
24 SYS_SAFE_BOOL operator bool() const { return myPtr!=nullptr; } \
25 bool operator==(const TYPE& x) const { return myPtr == x.myPtr; } \
26 bool operator!=(const TYPE& x) const { return !(*this == x); } \
27 size_t hash() const { return SYShash(myPtr); } \
29 TYPE(void *p) : myPtr(p) { } \
32 friend class FBX_SceneProxy; \
33 friend struct FBX_Detail; \
34 friend struct UT::DefaultClearer<TYPE>; \
36 inline size_t hash_value(TYPE id) { return id.hash(); } \
37 SYS_DECLARE_IS_POD(TYPE); \
39 template <typename T> struct DefaultClearer; \
41 struct DefaultClearer<TYPE> \
43 using VoidP = void*; \
44 static void clear(TYPE& v) { v.myPtr = VoidP(-1LL); } \
45 static bool isClear(const TYPE& v) { return v.myPtr==VoidP(-1LL); } \
46 static void clearConstruct(TYPE* p) { clear(*p); } \
47 static const bool clearNeedsDestruction = false; \
52 #endif // __FBX_SCENEPROXYSUPPORT_H_INCLUDED__