diff options
author | ConfuSomu | 2023-08-03 17:23:33 +0200 |
---|---|---|
committer | ConfuSomu | 2023-08-03 17:23:33 +0200 |
commit | bf73a19e11e5cccd22f58a5c97e1346dab5587c8 (patch) | |
tree | 64654503131a2eb77c5e9cbf25478330e8ce261b /src/archive/base_archive.cpp | |
parent | 1500681405804b932761db7a0182d498894ad81c (diff) | |
download | ActorViewer-bf73a19e11e5cccd22f58a5c97e1346dab5587c8.tar ActorViewer-bf73a19e11e5cccd22f58a5c97e1346dab5587c8.tar.gz ActorViewer-bf73a19e11e5cccd22f58a5c97e1346dab5587c8.zip |
Create an Archive base class
This class is inherited by MastodonArchive to provide Mastodon (and
compatible) archive reading support. A base Archive class allows
implementing reading support of other archive formats that are from
other services.
Diffstat (limited to 'src/archive/base_archive.cpp')
-rw-r--r-- | src/archive/base_archive.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/archive/base_archive.cpp b/src/archive/base_archive.cpp new file mode 100644 index 0000000..14fa417 --- /dev/null +++ b/src/archive/base_archive.cpp @@ -0,0 +1,13 @@ +#include "src/archive/base_archive.h" +#include "src/archive/mastodon.h" + +Archive* Archive::create_archive(ArchiveType archive_type, const QString& main_filename) { + switch (archive_type) { + case MASTODON: + return new MastodonArchive(main_filename); + default: + return nullptr; + } +} + +Archive::Archive(const QString& filename) : main_filename(filename) {} |