V-Gears 0
Free Final Fantasy VII engine.
VGearsLGPArchiveFactory.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 The V-Gears Team
3 *
4 * This file is part of V-Gears
5 *
6 * V-Gears is free software: you can redistribute it and/or modify it under
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, version 3.0 (GPLv3) of the License.
9 *
10 * V-Gears is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#pragma once
17
18#include <OgreArchiveFactory.h>
19#include "VGearsLGPArchive.h"
20
21namespace VGears{
22
26 class LGPArchiveFactory : public Ogre::ArchiveFactory{
27
28 // TODO: Move implemented methods to cpp file.
29
30 public:
31
36
40 virtual ~LGPArchiveFactory();
41
47 const String& getType(void) const{return ARCHIVE_TYPE;}
48
57 Ogre::Archive* createInstance(
58 const String& name, bool readOnly
59 ) override final{
60 return OGRE_NEW LGPArchive(name, ARCHIVE_TYPE);
61 }
62
68 void destroyInstance( Ogre::Archive* arch ) override final{
69 OGRE_DELETE arch;
70 }
71
75 static const String ARCHIVE_TYPE;
76
77 };
78}
A factory for LGP archives.
Definition: VGearsLGPArchiveFactory.h:26
void destroyInstance(Ogre::Archive *arch) override final
Destroys a LGP archive created by this factory.
Definition: VGearsLGPArchiveFactory.h:68
static const String ARCHIVE_TYPE
The archive type.
Definition: VGearsLGPArchiveFactory.h:75
Ogre::Archive * createInstance(const String &name, bool readOnly) override final
Creates a new LGP archive.
Definition: VGearsLGPArchiveFactory.h:57
virtual ~LGPArchiveFactory()
Destructor.
Definition: VGearsLGPArchiveFactory.cpp:24
const String & getType(void) const
Retrieves the factory type.
Definition: VGearsLGPArchiveFactory.h:47
LGPArchiveFactory()
Constructor.
Definition: VGearsLGPArchiveFactory.cpp:22
Handles LZS compressed archives.
Definition: VGearsLGPArchive.h:26
Definition: FF7NameLookup.h:24
Ogre::String String
Definition: TypeDefine.h:37