Allow checking registration for GB_CALLBACK

Add cb_type ## _is_registered function for GOLDBERG_CALLBACK_INTERNAL
macro to allow external checking of the callback's registration status
with CCallbackMgr.
This commit is contained in:
redpolline 2024-12-16 02:24:29 -05:00
parent f693bfb073
commit 4dbf130cb9

View file

@ -66,8 +66,15 @@
obj->fname(reinterpret_cast<cb_type*>(callback)); \
} \
} \
bool isRegistered() { \
return ( m_nCallbackFlags & k_ECallbackFlagsRegistered ); \
} \
private: \
} m_steamcallback_ ## fname ; void fname(cb_type *callback )
} m_steamcallback_ ## fname ; \
void fname(cb_type *callback) ; \
bool cb_type ## _is_registered() { \
return m_steamcallback_ ## fname.isRegistered(); \
}
template<int sizeof_cb_type>
class GB_CCallbackInterImp : protected CCallbackBase