From c5d7d8ab002cf73fd309a4eb65e4fc8d5dafa9db Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 12 May 2020 14:19:05 +0300 Subject: event cursors for mdbx driver --- include/m_database.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/m_database.h b/include/m_database.h index 259e3a5699..972a1d2ece 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -702,7 +702,7 @@ public: ///////////////////////////////////////////////////////////////////////////////////////// // Event cursors -class MIR_CORE_EXPORT EventCursorBase : public MZeroedObject +class MIR_CORE_EXPORT EventCursor : public MZeroedObject { friend class EventIterator; @@ -710,11 +710,11 @@ protected: DBEVENTINFO &dbei; MCONTACT hContact; - virtual ~EventCursorBase(); + virtual ~EventCursor(); virtual MEVENT FetchNext() = 0; public: - EventCursorBase(MCONTACT _1, DBEVENTINFO &_2) : + EventCursor(MCONTACT _1, DBEVENTINFO &_2) : hContact(_1), dbei(_2) { } @@ -728,17 +728,13 @@ public: } }; -#if !defined(CUSTOM_EVENT_CURSOR) -typedef class EventCursorBase EventCursor; -#endif - class EventIterator { - EventCursorBase *cursor; - MEVENT hCurr; + EventCursor *cursor; + MEVENT hCurr = 0; public: - EventIterator(EventCursorBase *_1) : + EventIterator(EventCursor *_1) : cursor(_1) {} -- cgit v1.2.3