From 7a98c9853726ed09abd35a447f9854c5459a855d Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 21 Mar 2017 13:09:46 +0100 Subject: Move type implementations in one place Having them separated is rather pointless (since we need one for every type, and all types are the interface of sink, as one), and caused quite a bit of friction when adding new types. This will also make it easier to change things for all types. --- common/domain/event.h | 57 --------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 common/domain/event.h (limited to 'common/domain/event.h') diff --git a/common/domain/event.h b/common/domain/event.h deleted file mode 100644 index b683f5f..0000000 --- a/common/domain/event.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2014 Christian Mollekopf - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ -#pragma once - -#include "applicationdomaintype.h" - -class QByteArray; - -template -class ReadPropertyMapper; -template -class WritePropertyMapper; -class IndexPropertyMapper; - -class TypeIndex; - -namespace Sink { -namespace ApplicationDomain { - namespace Buffer { - struct Event; - struct EventBuilder; - } - -/** - * Implements all type-specific code such as updating and querying indexes. - * - * These are type specifiy default implementations. Theoretically a resource could implement it's own implementation. - */ -template<> -class TypeImplementation { -public: - typedef Sink::ApplicationDomain::Buffer::Event Buffer; - typedef Sink::ApplicationDomain::Buffer::EventBuilder BufferBuilder; - static void configure(TypeIndex &); - static void configure(ReadPropertyMapper &); - static void configure(WritePropertyMapper &); - static void configure(IndexPropertyMapper &indexPropertyMapper); -}; - -} -} -- cgit v1.2.3