mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator
synced 2025-07-03 18:52:22 +08:00
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:
parent
f693bfb073
commit
4dbf130cb9
@ -66,8 +66,15 @@
|
|||||||
obj->fname(reinterpret_cast<cb_type*>(callback)); \
|
obj->fname(reinterpret_cast<cb_type*>(callback)); \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
|
bool isRegistered() { \
|
||||||
|
return ( m_nCallbackFlags & k_ECallbackFlagsRegistered ); \
|
||||||
|
} \
|
||||||
private: \
|
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>
|
template<int sizeof_cb_type>
|
||||||
class GB_CCallbackInterImp : protected CCallbackBase
|
class GB_CCallbackInterImp : protected CCallbackBase
|
||||||
|
Loading…
x
Reference in New Issue
Block a user