]> git.saurik.com Git - wxWidgets.git/commitdiff
add IsOk() (closes #9872)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 25 Jan 2009 12:04:25 +0000 (12:04 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 25 Jan 2009 12:04:25 +0000 (12:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/ole/automtn.h
interface/wx/msw/ole/automtn.h

index 87f2ff1538f99fdc27784e358fe48b5f4e9c66da..c119874092df6a6fc07ea66cddfb83ed06a9716b 100644 (file)
@@ -38,8 +38,9 @@ public:
     virtual ~wxAutomationObject();
 
     // Set/get dispatch pointer
-    inline void SetDispatchPtr(WXIDISPATCH* dispatchPtr) { m_dispatchPtr = dispatchPtr; }
-    inline WXIDISPATCH* GetDispatchPtr() const { return m_dispatchPtr; }
+    void SetDispatchPtr(WXIDISPATCH* dispatchPtr) { m_dispatchPtr = dispatchPtr; }
+    WXIDISPATCH* GetDispatchPtr() const { return m_dispatchPtr; }
+    bool IsOk() const { return m_dispatchPtr != NULL; }
 
     // Get a dispatch pointer from the current object associated
     // with a class id, such as "Excel.Application"
index 818169b0b19e8659118d414bcf2dcfac75cde75e..f29b9f86c08679c0110a029c71cc02c1e804cf56 100644 (file)
@@ -81,6 +81,16 @@ public:
     */
     bool CreateInstance(const wxString& classId) const;
 
+    /**
+        Checks if the object is in a valid state.
+
+        Returns @true if the object was successfully initialized or @false if
+        it has no valid IDispatch pointer.
+
+        @see GetDispatchPtr()
+     */
+    bool IsOk() const;
+
     /**
         Gets the IDispatch pointer.
     */