From kde-commits Mon Aug 11 17:54:00 2008 From: Matthias Kretz Date: Mon, 11 Aug 2008 17:54:00 +0000 To: kde-commits Subject: KDE/kdebase/runtime/phonon/xine Message-Id: <1218477240.076005.18909.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=121847724815257 SVN commit 845456 by mkretz: add EVENT_CLASS0 and make ctors explicitly inline M +12 -2 events.h --- trunk/KDE/kdebase/runtime/phonon/xine/events.h #845455:845456 @@ -32,11 +32,21 @@ #define QEVENT(type) Event(Event::type) +#define EVENT_CLASS0(type) \ +class type##Event : public Event \ +{ \ + public: \ + inline type##Event() : QEVENT(type) {} \ +}; \ +template <> inline type##Event *copyEvent(type##Event *) \ +{ \ + return new type##Event(); \ +} #define EVENT_CLASS1(type, arg1, init1, member1type, member1name) \ class type##Event : public Event \ { \ public: \ - type##Event(arg1) : QEVENT(type), init1 {} \ + inline type##Event(arg1) : QEVENT(type), init1 {} \ member1type member1name; \ }; \ template <> inline type##Event *copyEvent(type##Event *e) \ @@ -47,7 +57,7 @@ class type##Event : public Event \ { \ public: \ - type##Event(arg1, arg2) : QEVENT(type), init1, init2 {} \ + inline type##Event(arg1, arg2) : QEVENT(type), init1, init2 {} \ member1type member1name; \ member2type member2name; \ }; \