From a2a4d09cbd42d3de8380ee0061a80cdc0bfb4e6c Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 21 Mar 2017 12:41:55 +0100 Subject: Removed unnecessary default implementations --- examples/dummyresource/CMakeLists.txt | 2 +- examples/dummyresource/facade.cpp | 51 ------------------------------ examples/dummyresource/facade.h | 44 -------------------------- examples/dummyresource/resourcefactory.cpp | 8 +++-- 4 files changed, 6 insertions(+), 99 deletions(-) delete mode 100644 examples/dummyresource/facade.cpp delete mode 100644 examples/dummyresource/facade.h (limited to 'examples/dummyresource') diff --git a/examples/dummyresource/CMakeLists.txt b/examples/dummyresource/CMakeLists.txt index 6400f0c..2bbaa47 100644 --- a/examples/dummyresource/CMakeLists.txt +++ b/examples/dummyresource/CMakeLists.txt @@ -4,7 +4,7 @@ add_definitions(-DQT_PLUGIN) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) -add_library(${PROJECT_NAME} SHARED facade.cpp resourcefactory.cpp domainadaptor.cpp dummystore.cpp) +add_library(${PROJECT_NAME} SHARED resourcefactory.cpp domainadaptor.cpp dummystore.cpp) generate_flatbuffers(${PROJECT_NAME} dummycalendar) qt5_use_modules(${PROJECT_NAME} Core Network) target_link_libraries(${PROJECT_NAME} sink) diff --git a/examples/dummyresource/facade.cpp b/examples/dummyresource/facade.cpp deleted file mode 100644 index 4343eba..0000000 --- a/examples/dummyresource/facade.cpp +++ /dev/null @@ -1,51 +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. - */ - -#include "facade.h" - -#include "domainadaptor.h" - -DummyResourceFacade::DummyResourceFacade(const Sink::ResourceContext &context) - : Sink::GenericFacade(context) -{ -} - -DummyResourceFacade::~DummyResourceFacade() -{ -} - - -DummyResourceMailFacade::DummyResourceMailFacade(const Sink::ResourceContext &context) - : Sink::GenericFacade(context) -{ -} - -DummyResourceMailFacade::~DummyResourceMailFacade() -{ -} - - -DummyResourceFolderFacade::DummyResourceFolderFacade(const Sink::ResourceContext &context) - : Sink::GenericFacade(context) -{ -} - -DummyResourceFolderFacade::~DummyResourceFolderFacade() -{ -} diff --git a/examples/dummyresource/facade.h b/examples/dummyresource/facade.h deleted file mode 100644 index 1bb45fd..0000000 --- a/examples/dummyresource/facade.h +++ /dev/null @@ -1,44 +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 "common/facade.h" -#include "common/domain/event.h" - -class DummyResourceFacade : public Sink::GenericFacade -{ -public: - DummyResourceFacade(const Sink::ResourceContext &context); - virtual ~DummyResourceFacade(); -}; - -class DummyResourceMailFacade : public Sink::GenericFacade -{ -public: - DummyResourceMailFacade(const Sink::ResourceContext &context); - virtual ~DummyResourceMailFacade(); -}; - -class DummyResourceFolderFacade : public Sink::GenericFacade -{ -public: - DummyResourceFolderFacade(const Sink::ResourceContext &context); - virtual ~DummyResourceFolderFacade(); -}; diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp index e915710..cf20633 100644 --- a/examples/dummyresource/resourcefactory.cpp +++ b/examples/dummyresource/resourcefactory.cpp @@ -46,6 +46,8 @@ SINK_DEBUG_AREA("dummyresource") +using namespace Sink; + class DummySynchronizer : public Sink::Synchronizer { public: @@ -194,9 +196,9 @@ Sink::Resource *DummyResourceFactory::createResource(const Sink::ResourceContext void DummyResourceFactory::registerFacades(const QByteArray &resourceName, Sink::FacadeFactory &factory) { - factory.registerFacade(resourceName); - factory.registerFacade(resourceName); - factory.registerFacade(resourceName); + factory.registerFacade>(resourceName); + factory.registerFacade>(resourceName); + factory.registerFacade>(resourceName); } void DummyResourceFactory::registerAdaptorFactories(const QByteArray &resourceName, Sink::AdaptorFactoryRegistry ®istry) -- cgit v1.2.3