diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-02-26 02:04:21 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-02-26 02:04:21 +0100 |
commit | 71e4b147ec3b8c5f3e2a004920ffbc0a3b6e18c8 (patch) | |
tree | 2b96e6bc1c531c094a1a9d41e171cbed9e97210e /logic/minecraft/RawLibrary.h | |
parent | f6b2ccb110f0bb4071044456a93c6edc1de50922 (diff) | |
download | MultiMC-71e4b147ec3b8c5f3e2a004920ffbc0a3b6e18c8.tar MultiMC-71e4b147ec3b8c5f3e2a004920ffbc0a3b6e18c8.tar.gz MultiMC-71e4b147ec3b8c5f3e2a004920ffbc0a3b6e18c8.tar.lz MultiMC-71e4b147ec3b8c5f3e2a004920ffbc0a3b6e18c8.tar.xz MultiMC-71e4b147ec3b8c5f3e2a004920ffbc0a3b6e18c8.zip |
NOISSUE remove OneSixLibrary
Diffstat (limited to 'logic/minecraft/RawLibrary.h')
-rw-r--r-- | logic/minecraft/RawLibrary.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/logic/minecraft/RawLibrary.h b/logic/minecraft/RawLibrary.h index efe51bc0..7f0aed2f 100644 --- a/logic/minecraft/RawLibrary.h +++ b/logic/minecraft/RawLibrary.h @@ -18,14 +18,36 @@ typedef std::shared_ptr<RawLibrary> RawLibraryPtr; class RawLibrary { - friend class OneSixLibrary; -public: /* methods */ +public: + RawLibrary() + { + } + RawLibrary(const QString &name) + { + m_name = name; + } + /// limited copy without some data. TODO: why? + static RawLibraryPtr limitedCopy(RawLibraryPtr base) + { + auto newlib = std::make_shared<RawLibrary>(); + newlib->m_name = base->m_name; + newlib->m_base_url = base->m_base_url; + newlib->m_hint = base->m_hint; + newlib->m_absolute_url = base->m_absolute_url; + newlib->extract_excludes = base->extract_excludes; + newlib->m_native_classifiers = base->m_native_classifiers; + newlib->m_rules = base->m_rules; + newlib->m_storagePrefix = base->m_storagePrefix; + return newlib; + } + /// read and create a basic library static RawLibraryPtr fromJson(const QJsonObject &libObj, const QString &filename); /// Convert the library back to an JSON object QJsonObject toJson() const; +public: /* methods */ /// Returns the raw name field const GradleSpecifier & rawName() const { |