aboutsummaryrefslogtreecommitdiff
path: root/libs/bsapacker/src/DummyPluginLogic.h
blob: ee9e8934893722ef3815c92745eb1d2dde1f58a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef DUMMYPLUGINLOGIC_H
#define DUMMYPLUGINLOGIC_H

#include <bsapacker/IDummyPluginLogic.h>
#include <bsapacker/ISettingsService.h>
#include <bsapacker/IArchiveNameService.h>

namespace BsaPacker
{
	class DummyPluginLogic : public IDummyPluginLogic
	{
	public:
		DummyPluginLogic(const ISettingsService* settingsService,
			const IArchiveNameService* archiveNameService);
		~DummyPluginLogic() override = default;
		[[nodiscard]] bool canCreateDummyESP(const QString& fileNameNoExtension, const bsa_archive_type_e type) const override;
		[[nodiscard]] bool canCreateDummyESL(const QString& fileNameNoExtension, const bsa_archive_type_e type) const override;

	private:
		template<std::size_t SIZE>
		bool canCreateDummy(const std::array<QString, SIZE>& fileList,
			const QString& fileNameNoExtension,
			const bsa_archive_type_e type) const;

		const ISettingsService* m_SettingsService = nullptr;
		const IArchiveNameService* m_ArchiveNameService = nullptr;
	};
}

#endif // DUMMYPLUGINLOGIC_H