diff --git a/include/sqrat/sqratUtil.h b/include/sqrat/sqratUtil.h index 2c08558d..e81eaa4b 100644 --- a/include/sqrat/sqratUtil.h +++ b/include/sqrat/sqratUtil.h @@ -1325,6 +1325,24 @@ public: return *this; } + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// Checks if there is an associated managed object + /// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + operator bool () const + { + return m_Ptr != NULL; + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + /// Checks if there is NOT an associated managed object + /// + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + bool operator!() const + { + return m_Ptr == NULL; + } + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Checks whether the managed object exists ///