#ifndef CSV_DOC_SUBVIEWFACTORYIMP_H #define CSV_DOC_SUBVIEWFACTORYIMP_H #include "../../model/doc/document.hpp" #include "subviewfactory.hpp" namespace CSVDoc { template class SubViewFactory : public SubViewFactoryBase { public: CSVDoc::SubView* makeSubView(const CSMWorld::UniversalId& id, CSMDoc::Document& document) override; }; template CSVDoc::SubView* SubViewFactory::makeSubView(const CSMWorld::UniversalId& id, CSMDoc::Document& document) { return new SubViewT(id, document); } template class SubViewFactoryWithCreator : public SubViewFactoryBase { bool mSorting; public: SubViewFactoryWithCreator(bool sorting = true); CSVDoc::SubView* makeSubView(const CSMWorld::UniversalId& id, CSMDoc::Document& document) override; }; template SubViewFactoryWithCreator::SubViewFactoryWithCreator(bool sorting) : mSorting(sorting) { } template CSVDoc::SubView* SubViewFactoryWithCreator::makeSubView( const CSMWorld::UniversalId& id, CSMDoc::Document& document) { return new SubViewT(id, document, CreatorFactoryT(), mSorting); } } #endif