summaryrefslogtreecommitdiffstats
path: root/logic/minecraft/OneSixRule.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-07-26 23:00:35 +0200
committerPetr Mrázek <peterix@gmail.com>2014-07-26 23:00:35 +0200
commit03b13b0b3f43e830ca924338b38e1947cd0cc739 (patch)
tree08941e693ab365f934beba04d69aacf481be40d1 /logic/minecraft/OneSixRule.h
parent9b82c87c92761515a11f00540a6bf74df6c76298 (diff)
downloadMultiMC-03b13b0b3f43e830ca924338b38e1947cd0cc739.tar
MultiMC-03b13b0b3f43e830ca924338b38e1947cd0cc739.tar.gz
MultiMC-03b13b0b3f43e830ca924338b38e1947cd0cc739.tar.lz
MultiMC-03b13b0b3f43e830ca924338b38e1947cd0cc739.tar.xz
MultiMC-03b13b0b3f43e830ca924338b38e1947cd0cc739.zip
Rearrange RawLibrary and OneSixLibrary heavily.
Fix #396
Diffstat (limited to 'logic/minecraft/OneSixRule.h')
-rw-r--r--logic/minecraft/OneSixRule.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/logic/minecraft/OneSixRule.h b/logic/minecraft/OneSixRule.h
index a18093b0..33f7ff93 100644
--- a/logic/minecraft/OneSixRule.h
+++ b/logic/minecraft/OneSixRule.h
@@ -21,7 +21,7 @@
#include <memory>
#include "OpSys.h"
-class OneSixLibrary;
+class RawLibrary;
class Rule;
enum RuleAction
@@ -37,7 +37,7 @@ class Rule
{
protected:
RuleAction m_result;
- virtual bool applies(OneSixLibrary *parent) = 0;
+ virtual bool applies(const RawLibrary *parent) = 0;
public:
Rule(RuleAction result) : m_result(result)
@@ -45,14 +45,13 @@ public:
}
virtual ~Rule() {};
virtual QJsonObject toJson() = 0;
- RuleAction apply(OneSixLibrary *parent)
+ RuleAction apply(const RawLibrary *parent)
{
if (applies(parent))
return m_result;
else
return Defer;
}
- ;
};
class OsRule : public Rule
@@ -64,7 +63,7 @@ private:
QString m_version_regexp;
protected:
- virtual bool applies(OneSixLibrary *)
+ virtual bool applies(const RawLibrary *)
{
return (m_system == currentSystem);
}
@@ -85,7 +84,7 @@ public:
class ImplicitRule : public Rule
{
protected:
- virtual bool applies(OneSixLibrary *)
+ virtual bool applies(const RawLibrary *)
{
return true;
}